#include <bits/stdc++.h>
using namespace std;
const int len = 100010;
char a[len];
string b = "heidi";
bool pd(char a[], int n) {
  bool ans;
  int i = 0;
  for (int j = 0; j < 5; j++) {
    ans = false;
    while (i < n) {
      if (a[i] == b[j]) {
        ans = true;
        i++;
        break;
      }
      i++;
    }
    if (!ans) return false;
  }
  return true;
}
int main() {
  scanf("%s", a);
  int n = strlen(a);
  if (n == 5 && a[0] == 'h' && a[1] == 'e' && a[2] == 'i' && a[3] == 'd' &&
      a[4] == 'i')
    cout << "YES" << endl;
  else {
    if (n <= 5)
      cout << "NO" << endl;
    else {
      if (pd(a, n))
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
  return 0;
}
