#include <bits/stdc++.h>
using namespace std;
long long x, m, q, n, p, cnt = 1, y, ans, sum, ar[1001], mx = 0;
vector<int> v, v1, v2;
long long mn = 9999999;
int main() {
  cnt = 0;
  ios_base::sync_with_stdio();
  string s, g = "heidi";
  cin >> s;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == g[0]) {
      g.erase(g.begin());
    }
  }
  if (g.size() == 0)
    cout << "YES\n";
  else
    cout << "NO\n";
}
