#include <bits/stdc++.h>
using namespace std;
const int Z = (int)1e3 + 123;
const int inf = (int)2e9 + 1;
const long long llinf = (long long)2e18 + 1;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  string s;
  cin >> s;
  int i = 0;
  while (i < s.size() && s[i] != 'h') {
    i++;
  }
  if (i == s.size()) {
    cout << "NO";
    return 0;
  }
  while (i < s.size() && s[i] != 'e') {
    i++;
  }
  if (i == s.size()) {
    cout << "NO";
    return 0;
  }
  while (i < s.size() && s[i] != 'i') {
    i++;
  }
  if (i == s.size()) {
    cout << "NO";
    return 0;
  }
  while (i < s.size() && s[i] != 'd') {
    i++;
  }
  if (i == s.size()) {
    cout << "NO";
    return 0;
  }
  while (i < s.size() && s[i] != 'i') {
    i++;
  }
  if (i == s.size()) {
    cout << "NO";
    return 0;
  }
  cout << "YES";
  return 0;
}
