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