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