#include <bits/stdc++.h>
using namespace std;
char t[] = "heidi";
int main() {
  string s;
  cin >> s;
  for (int i = 0, j = 0; i < 5; ++i) {
    while (j < s.size()) {
      if (s[j] == t[i]) break;
      j++;
    }
    if (j == s.size()) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}
