#include <bits/stdc++.h>
using namespace std;
string str;
vector<int> g[126];
void read() { cin >> str; }
void work() {
  for (int i = 0; i < str.length(); i++) {
    g[(int)str[i]].push_back(i);
  }
  if (g['h'].empty()) {
    puts("NO");
  } else {
    int ans = g['h'][0];
    int p = upper_bound(g[101].begin(), g[101].end(), ans) - g[101].begin();
    if (p == g['e'].size()) {
      puts("NO");
      return;
    }
    ans = g[101][p];
    p = upper_bound(g['i'].begin(), g['i'].end(), ans) - g['i'].begin();
    if (p == g['i'].size()) {
      puts("NO");
      return;
    }
    ans = g['i'][p];
    p = upper_bound(g['d'].begin(), g['d'].end(), ans) - g['d'].begin();
    if (p == g['d'].size()) {
      puts("NO");
      return;
    }
    ans = g['d'][p];
    p = upper_bound(g['i'].begin(), g['i'].end(), ans) - g['i'].begin();
    if (p == g['i'].size()) {
      puts("NO");
      return;
    }
    puts("YES");
    return;
  }
}
int main() {
  read();
  work();
  return 0;
}
