#include <bits/stdc++.h>
using namespace std;
int main() {
  const int n = 1001;
  char string[n];
  bool mark[4] = {false};
  cin >> string;
  char *s;
  s = string;
  for (; *s != '\0'; s++) {
    if (*s == 'h') mark[0] = true;
    if (mark[0] && *s == 'e') mark[1] = true;
    if (mark[1] && *s == 'i') mark[2] = true;
    if (mark[2] && *s == 'd') mark[3] = true;
    if (mark[3] && *s == 'i') {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
