#include <bits/stdc++.h>
using namespace std;
int main() {
  int i;
  string s;
  cin >> s;
  while ((s[i] != 'h') && (i < s.length())) i++;
  if (i > s.length() - 4) {
    cout << "NO";
    return 0;
  }
  while ((s[i] != 'e') && (i < s.length())) i++;
  if (i > s.length() - 3) {
    cout << "NO";
    return 0;
  }
  while ((s[i] != 'i') && (i < s.length())) i++;
  if (i > s.length() - 2) {
    cout << "NO";
    return 0;
  }
  while ((s[i] != 'd') && (i < s.length())) i++;
  if (i > s.length() - 1) {
    cout << "NO";
    return 0;
  }
  while ((s[i] != 'i') && (i < s.length())) i++;
  if (s[i] != 'i') {
    cout << "NO";
    return 0;
  }
  cout << "YES";
  return 0;
  return 0;
}
