#include <bits/stdc++.h>
using namespace std;
int main() {
  string major, minor;
  cin >> major;
  minor = "heidi";
  long long i = 0, j = 0;
  while (i < (int)major.length() && j < (int)minor.length()) {
    if (minor[j] == major[i]) j++;
    i++;
  }
  if (j == (int)minor.length())
    cout << "YES";
  else
    cout << "NO";
}
