#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    string s;
    cin >> s;
    int n = s.size(), flag = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] == 'h' && flag == 0) flag++;
      if (s[i] == 'e' && flag == 1) flag++;
      if (s[i] == 'i' && flag == 2) flag++;
      if (s[i] == 'd' && flag == 3) flag++;
      if (s[i] == 'i' && flag == 4) flag++;
    }
    if (flag == 5)
      cout << "YES";
    else
      cout << "NO";
    cout << endl;
  }
  return 0;
}
