#include <bits/stdc++.h>
using namespace std;
int IT_MAX = 1 << 18;
const long long MOD = 1000000009;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 3234567890123456789ll;
const double PI = acos(-1);
const double EPS = 1e-8;
int main() {
  string s;
  cin >> s;
  string u = "heidi";
  int j = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == u[j]) {
      j++;
      if (j == u.length()) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
}
