#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int i, len = s.size();
  int ageHache = 0, ageEache = 0, ageIache = 0, ageDache = 0, arektaIache = 0;
  for (i = 0; i < len; i++) {
    if (s.at(i) == 'h') ageHache = 1;
    if (ageHache == 1 && s.at(i) == 'e') ageEache = 1;
    if (ageEache == 1 && s.at(i) == 'i') ageIache = 1;
    if (ageIache == 1 && s.at(i) == 'd') ageDache = 1;
    if (ageDache == 1 && s.at(i) == 'i') {
      arektaIache = 1;
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
