#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long a, b, c, d, e, g, n, t, f = 0, f1 = 0, flag = 0, co = 0, co1 = 0,
                                    co2 = 0, arr1[10001], arr[200001] = {0},
                                    sum = 0, sum1 = 0, ma = 0, mi = 10000000000;
  int x[] = {1, 0, -1, 0};
  int y[] = {0, 1, 0, -1};
  double pi = 2 * acos(0.0);
  string s, str, str1, str2;
  char ch;
  set<long long>::iterator it;
  vector<long long> v1;
  vector<pair<int, int> > v;
  cin >> str;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == 'h') {
      for (int j = i + 1; j < str.size(); j++) {
        if (str[j] == 'e') {
          for (int k = j + 1; k < str.size(); k++) {
            if (str[k] == 'i') {
              for (int l = k + 1; l < str.size(); l++) {
                if (str[l] == 'd') {
                  for (int m = l + 1; m < str.size(); m++) {
                    if (str[m] == 'i') {
                      flag = 1;
                      break;
                    }
                  }
                  break;
                }
              }
              break;
            }
          }
          break;
        }
      }
      break;
    }
  }
  if (flag == 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
