#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string x, y("heidi");
  cin >> x;
  for (int i = 0, j = 0; x[i]; i++) {
    if (x[i] == y[j]) {
      j++;
      n = j;
    }
  }
  cout << (n == 5 ? "YES" : "NO") << endl;
  return 0;
}
