#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vll = vector<long long>;
using vpii = vector<pair<int, int>>;
using vs = vector<string>;
void solve() {
  string s;
  cin >> s;
  int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
  for (auto item : s) {
    if (item == 'h') a = 1;
    if (a and item == 'e') b = 1;
    if (b and item == 'i') c = 1;
    if (c and item == 'd') d = 1;
    if (d and item == 'i') {
      cout << "YES" << endl;
      return;
    }
  }
  cout << "NO" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
}
