#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const double EPS = 1e-9;
using namespace std;
int main() {
  string line, p = "heidi";
  getline(cin, line);
  int i = 0, j = 0;
  while (i < line.size() && j < 5) {
    if (line[i] == p[j]) j++;
    i++;
  }
  if (j == 5)
    puts("YES");
  else
    puts("NO");
  return 0;
}
