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