#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  s = "heidi";
  cin >> t;
  queue<char> qs;
  for (char &i : s) {
    qs.push(i);
  }
  for (char &i : t)
    if (i == qs.front()) qs.pop();
  cout << (qs.empty() ? "YES" : "NO") << endl;
}
