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