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