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