#include <bits/stdc++.h>
using namespace std;
int main() {
  string name = "heidi";
  int len = name.size();
  string s;
  cin >> s;
  int lens = s.size(), j = 0;
  for (int i = 0; i < lens; i++) {
    if (s[i] == name[j]) {
      j++;
      if (j == len) {
        printf("YES\n");
        return 0;
      }
    }
  }
  printf("NO\n");
  return 0;
}
