#include <bits/stdc++.h>
using namespace std;
void sss(string s) { cout << s, printf("\n"); }
long long string_to_ll(string s) {
  stringstream ss;
  ss << s;
  long long n;
  ss >> n;
  return n;
}
string ll_to_string(long long n) {
  stringstream ss;
  ss << n;
  string s;
  ss >> s;
  return s;
}
bool subsequence(string s1, string s2, int m, int n) {
  if (m == 0) return true;
  if (n == 0) return false;
  if (s1[m - 1] == s2[n - 1]) return subsequence(s1, s2, m - 1, n - 1);
  return subsequence(s1, s2, m, n - 1);
}
int main() {
  string s1 = "heidi", s2;
  cin >> s2;
  int m = 5, n = s2.size();
  if (subsequence(s1, s2, m, n) == true)
    sss("YES");
  else
    sss("NO");
  return 0;
}
