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