#include <bits/stdc++.h>
using namespace std;
char s[10005];
int main() {
  cin >> s;
  int len = strlen(s), idx = 0;
  for (int i = 0; i < len; i++) {
    if (s[i] == 'h' && idx == 0)
      idx++;
    else if (s[i] == 'e' && idx == 1)
      idx++;
    else if (s[i] == 'i' && idx == 2)
      idx++;
    else if (s[i] == 'd' && idx == 3)
      idx++;
    else if (s[i] == 'i' && idx == 4) {
      idx++;
      break;
    }
  }
  if (idx == 5)
    printf("YES");
  else
    printf("NO");
  return 0;
}
