#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[2000];
  int b = 1, c, d = 0, e, n;
  cin >> a;
  n = strlen(a);
  for (int i = 0; i < n; i++) {
    if (b == 1)
      if (a[i] == 'h')
        b = 2;
      else
        ;
    else if (b == 2)
      if (a[i] == 'e')
        b = 3;
      else
        ;
    else if (b == 3)
      if (a[i] == 'i')
        b = 4;
      else
        ;
    else if (b == 4)
      if (a[i] == 'd')
        b = 5;
      else
        ;
    else if (b == 5)
      if (a[i] == 'i') {
        d = 1;
        break;
      }
  }
  if (d == 1)
    cout << "YES";
  else
    cout << "NO";
}
