#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int c = 0;
  string s;
  cin >> s;
  for (long long int i = 0; i < s.size(); i++) {
    if (s[i] == 'h' && c == 0) c++;
    if (s[i] == 'e' && c == 1) c++;
    if (s[i] == 'i' && c == 2) c++;
    if (s[i] == 'd' && c == 3) c++;
    if (s[i] == 'i' && c == 4) c++;
  }
  if (c == 5)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
