#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double pi = acos(-1.0);
int main() {
  string s;
  string str = "heidi ";
  cin >> s;
  int now = 0;
  for (auto c : s)
    if (c == str[now]) ++now;
  if (now == 5)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
