#include <bits/stdc++.h>
using namespace std;
int main() {
  int now = 0;
  string s;
  cin >> s;
  string t = "heidi";
  bool flag = false;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == t[now]) {
      ++now;
    }
    if (now == t.size()) {
      flag = true;
      break;
    }
  }
  if (flag == true) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
