S = input()

ans = S[0:3] == "yah" and S[3] == S[4]

print("YES" if ans else "NO")

7123edc76b1acc264219f3848586915f7275dbfe
<mask token>

<mask token>
print('YES' if ans else 'NO')

S = input()
ans = S[0:3] == 'yah' and S[3] == S[4]
print('YES' if ans else 'NO')

S = input()

ans = S[0:3] == "yah" and S[3] == S[4]

print("YES" if ans else "NO")
