#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string h{"heidi"};
  int i{0};
  bool res{false};
  for (const auto& c : s) {
    if (c == h[i]) i++;
    if (i == 5) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
}
