#include <bits/stdc++.h>
using namespace std;
int main(int argc, char **argv) {
  string s;
  string fn = "heidi";
  cin >> s;
  int max_l = fn.length();
  int pos = 0;
  size_t found;
  for (int i = 0; i < max_l; i++) {
    found = s.find(fn[i], pos);
    if (found == string::npos) {
      cout << "NO";
      return 0;
    }
    pos = found;
  }
  cout << "YES";
  return 0;
}
