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