#include <bits/stdc++.h>
using namespace std;
string s;
queue<char> q;
int main() {
  q.push('h');
  q.push('e');
  q.push('i');
  q.push('d');
  q.push('i');
  cin >> s;
  int len = s.size();
  for (int i = 0; i < len; i++) {
    if (s[i] == q.front()) q.pop();
  }
  if (q.empty())
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
