#include <bits/stdc++.h>
using namespace std;
string s;
int pd;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'h' && pd == 0) pd++;
    if (s[i] == 'e' && pd == 1) pd++;
    if (s[i] == 'i' && pd == 2) pd++;
    if (s[i] == 'd' && pd == 3) pd++;
    if (s[i] == 'i' && pd == 4) pd++;
  }
  if (pd == 5)
    cout << "YES";
  else
    cout << "NO";
}
