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