peterverebics/CodeNet_Python_118 huggingface dataset:
s = input()
n = len(s)
if n % 2 != 0:
  print('No')
  exit()
q = n // 2
ss = 'hi' * q
if s == ss:
  print('Yes')
else:
  print('No')
S = input()
s = 'hi'
l = len(S)
if l % 2 == 1:
    print('No')
elif s * (l // 2) == S:
    print('Yes')
else:
    print('No')
s = str(input())
kekka = 1
for i in range(len(s)):
  if i%2 == 0 and s[i] != 'h':
    kekka = -1
    break
  elif i%2 == 1 and s[i] != 'i':
    kekka = -1
    break
if kekka == 1 and len(s)%2 == 0:
  print('Yes')
else:
  print('No')
s = input()
chars = s.split('hi')

for char in chars:
    if len(char) > 0:
        print('No')
        exit(0)
print('Yes')
S = input()
for i in range(0,len(S),2):
    if S[i:i+2] != "hi":
        print("No")
        exit()
print("Yes")
s = input()
f = False
chk = ''
for i in range(5):
    chk += 'hi'
    if s == chk:
        print('Yes')
        f = True
        break
if not f:
    print('No')
s = input()
s = s.replace('hi','')
if len(s) == 0:
  print('Yes')
else:
  print('No')
s=input()
x=""
for i in range(6):
    if x==s:
        print("Yes")
        exit()
    x+="hi"
print("No")
s = input()
s_r = s.replace("hi", "")

if len(list(s_r)) == 0:
    print("Yes")

else:
    print("No")
s=input()
d=["hi","hihi","hihihi","hihihihi","hihihihihi"]
if s in d:
  print("Yes")
else:
  print("No")
s = input()
tmps = s
flag = 1
while len(tmps)>1:
    if tmps[0:2] == 'hi':
        tmps = tmps[2:]
    else:
        flag = 0
        tmps = tmps[2:]
if len(tmps)==1 or flag==0:
    print('No')
else:
    print('Yes')
s=input()
num=len(s)
if num%2==1:
    print('No')

else:
    if 'hi'*(num//2)==s:
        print('Yes')
    else:
        print('No')
string = input().strip()
hi_string = "hi" * (len(string)//2)
if string == hi_string:
  print("Yes")
else:
  print("No")
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

    s=str(input())
    ls=len(s)
    if ls%2==1:
        print('No')
    else:
        if s=='hi'*(ls//2):
            print('Yes')
        else:
            print('No')


resolve()
s = input()
le = len(s)
if le % 2 == 1:
    print("No")
else:
    ns = "hi" * (le // 2)
    if ns == s:
        print("Yes")
    else:
        print("No")
S = input()

ans = 'Yes'
while len(S) > 0:
  if S[:2] == 'hi':
    S = S[2:]
  else:
    ans = 'No'
    break

print(ans)
s = input()
i = s.count('h')
j = s.count('i')
h = 'hi'

if h in s:
  if ('ii' or 'hh') in s:
    print('No')
  else:
    if i == j:
        print('Yes')
    else:
        print('No')
else:
  print('No')
s=input()
if s=="hi"*(len(s)//2):
  print("Yes")
else:
  print("No")
s = input().strip()
if s == "hi" or s == "hihi" or s == "hihihi" or s == "hihihihi" or s == "hihihihihi":
    print("Yes")
else:
    print("No")
S = input()

S = S.replace("hi", "")
if S == "":
    print("Yes")
else:
    print("No")
S = input()
judge = True
if len(S)%2==1:
  print('No')
  exit()
for i in range(len(S)):
  if i%2==0:
    if S[i]=='h':
      continue
    else:
      judge=False
      break
  else:
    if S[i]=='i':
      continue
    else:
      judge=False
      break
      
if judge:
  print('Yes')
else:
  print('No')
S = input()
L = len(S)
cnt = S.count("hi")

if (L % 2 != 0):
    print('No')
    exit()

elif (L // 2 == cnt):
    print('Yes')
else:
    print('No')
s=input()
n=len(s)
if n%2==0 and n//2==s.count("hi"):
    print("Yes")
else:
    print("No")
sl = input()


while sl:
    if sl[:2] != "hi":
        print("No")
        exit()
    else:
        sl = sl[2:]
print("Yes")
s=input()
if len(s)%2==1:
	print("No")
	exit()
for i in range(len(s)//2):
	if s[i*2]+s[i*2+1]=="hi":
		continue
	else:
		print("No")
		exit()
print("Yes")
s = input()
l = len(s)

if l % 2 == 1:
    print("No")
    exit()

real = "hi" * (l // 2)
if real == s:
    print("Yes")
else:
    print("No")
s = input()

if s.count('hi') == len(s)/2:
    print('Yes')
else:
    print('No')
import sys
from collections import deque


def input():
    return sys.stdin.readline()[:-1]


def solve():
    S = input()
    if len(S) % 2 != 0:
        print('No')
    else:
        for i in range(len(S) // 2):
            if S[2 * i:2 * i + 2] != 'hi':
                print('No')
                return
        print('Yes')


if __name__ == "__main__":
    solve()
S = input()

for i in range(1, 6):
    if 'hi' * i == S:
        print('Yes')
        exit()

print('No')
s = input()

cnt = 0
for i in range(0, len(s), 2):
    if s[i:i+2] == 'hi':
        cnt += 1

if cnt*2 == len(s):
    print('Yes')
else:
    print('No')
S = input()
ans = 'Yes'
if len(S)%2:
    ans = 'No'
else:
    for i, c in enumerate(S):
        if i%2 and c!='i':
            ans = 'No'
            break
        elif i%2 == 0 and c!='h':
            ans = 'No'
            break
print(ans)
S = input()

ans = "No"
for i in range(1,6):
    if S == "hi"*i:
        ans="Yes"
print(ans)
def solve(s):
    if len(s) % 2 == 1:
        return "No"
    for i, x in enumerate(s):
        if i % 2 == 0 and x != "h":
            return "No"
        if i % 2 == 1 and x != "i":
            return "No"
    return "Yes"


def main():
    s = input()
    res = solve(s)
    print(res)


def test():
    assert solve("hihi") == "Yes"
    assert solve("hi") == "Yes"
    assert solve("ha") == "No"


if __name__ == "__main__":
    test()
    main()
s = input()
isEmpty = False
if 'hi' not in s:
    print("No")
    isEmpty = True
s = s.split('hi')
s = set(s)
if not isEmpty:
    if '' in s and len(s) == 1:
        print("Yes")
    else:
        print("No")
S = input()

S_size = len(S)
S_hi = S.count('hi')

if S_size == S_hi*2:
    print('Yes')
else:
    print('No')
s=str(input())
if len(s)%2==1:
    print("No")
else:
    is_hitachi=1
    for i in range(int(len(s)/2)):
        if s[2*i]!="h" or s[2*i+1]!="i":
            is_hitachi=0
            break
    if is_hitachi==1:
        print("Yes")
    else:
        print("No")
import sys
s=input()
l=[]
for i in range(0,len(s),2):
    l.append(s[i:i+2])
    
count = 0
for i in l:
    if i != 'hi':
        print('No')
        sys.exit()

print('Yes')
S=input()
if 'hi' == S or 'hihi' == S or 'hihihi' == S or 'hihihihi' == S or 'hihihihihi' == S: 
    print('Yes')
else:
    print('No')
s = str(input())
if s == ('hi'):
    print('Yes')
elif s == ('hihi'):
    print('Yes')
elif s == ('hihihi'):
    print('Yes')
elif s == ('hihihihi'):
    print('Yes')
elif s == ('hihihihihi'):
    print('Yes')
else:
    print('No')
def main():

    S = input()
    for i in range(1, 10):
        if S == 'hi'*i:
            return 'Yes'
    return 'No'

if __name__ == '__main__':
    print(main())
s = input()
if len(s)%2 == 0:
    for i in range(len(s)):
        if i%2==0 and s[i] != 'h':
            print("No")
            break
        if i%2==1 and s[i] != 'i':
            print("No")
            break
    else:
        print("Yes")
else:
    print("No")
s = str(input())
s = s.replace("hi","")

if len(s) == 0:
  print("Yes")
else:
  print("No")
s = input()
if s.replace('hi','') == '':
    print('Yes')
else:
    print('No')
s = list(input())

i = 0
if len(s) % 2 != 0:
    print("No")
    exit()
while i < len(s):
    if s[i] != "h" or s[i + 1] != "i":
        print("No")
        exit()
    i += 2

print("Yes")
s = input()
if s == "hi" * (len(s) // 2):
    print("Yes")
else:
    print("No")
import re

str_ = input()
pattern = "hi"

results = re.sub(pattern, "", str_)

if results:
    print("No")
else:
    print("Yes")
a = input()

ans = "No"
if len(a) % 2 == 0:
    for i in range(int(len(a)/2)):
        if a[i*2] != "h" or a[i*2+1] != "i":
            break
    else:
        ans = "Yes"
print(ans)
S = input()

if len(S) % 2 == 1:
  print("No")
else:
  if S == (len(S) // 2) * "hi":
    print("Yes")
  else:
    print("No")
S = str(input())
S = S.replace('hi', "")

if(len(S)==0):
    print("Yes")
else:
    print("No")
s = str(input())

for i in range(10):
    if "hi" * i == s:
        print("Yes")
        exit(0)

print("No")
a=input()
list_1=list(a)
length=len(list_1)
count=0
if length%2==1:
  print("No")
else:
  for k in range(0,length,2):
    if list_1[k]=='h' and list_1[k+1]=='i':
      count+=2
      if count==length:
        print("Yes")
        break
    else:
      continue
  else:
    print("No")
S = input()

if (len(S) % 2 == 0) and (S.count('hi') == len(S) // 2):
    print('Yes')
else:
    print('No')
input = input()
n = 2
an = 0
splited = [input[i:i+n] for i in range(0, len(input), n)]
for ahd in splited:
  if splited[an] == "hi":
    an+=1
  else:
    break
if int(an) == int(len(splited)):
  print("Yes")
else:
  print("No")
def main():
    s = input()

    sc = s.count('h')
    sh = s.count('i')

    if sc != sh:
        print('No')
        exit()

    for i in range(len(s)):
        if i % 2 == 0:
            if s[i] != 'h':
                break
        else:
            if s[i] != 'i':
                break
    else:
        print('Yes')
        exit()

    print('No')

if __name__ == '__main__':
    main()
S = input()

if len(S)%2==1:
    print('No')
    exit()

for (i,j) in zip(S[::2],S[1::2]):

    if not (i == 'h' and j == 'i'):
        print('No')
        exit()
print("Yes")
s1=str(input())
ns1=s1.replace("hi","")

if ns1=="":
    print("Yes")
else:
    print("No")
s = input()
if s in ["hi" * i for i in range(1, 6)]:
  print("Yes")
else:
  print("No")
s = input()
if(s in ["hi", "hihi", "hihihi", "hihihihi", "hihihihihi"]): print("Yes")
else: print("No")
S = input()
if S == "hi" * (len(S) // 2):
    print("Yes")
else:
    print("No")
import sys
s = input()
def hitachi(s):
  n = len(s)
  if n % 2 != 0:
    return False
  for i in range(0, n, 2):
      if s[i] != 'h' or s[i + 1] != 'i':
          return False
  return True

if hitachi(s):
  print('Yes')
else:
  print('No')
#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	S = input()
	judge = "No"
	for i in range(1, 6):
		if S == "hi" * i:
			judge = "Yes"

	print(judge)


if __name__ == '__main__':
	main()
s = input()

if 'hi' * (len(s) // 2) == s:
    print('Yes')
else:
    print('No')
a=input()
if 'hi'*5==a:
    print('Yes')
elif 'hi'*4==a:
    print('Yes')
elif 'hi'*3==a:
    print('Yes')
elif 'hi'*2==a:
    print('Yes')
elif 'hi' == a:
    print('Yes')
else:
    print('No')
print('Yes' if input() in ['hi'*i for i in range(1,6)] else 'No')
s = input()
k = ""
for i in range(len(s)//2):
  k += "hi"
if s == k:
  print("Yes")
else:
  print("No")
s = input('')
l = s.replace('hi','')
if len(l) > 0:
  print("No")
elif len(s) == 0:
  print("No")
else:
  print("Yes")
s = input()
if s in ["hi", "hihi", "hihihi", "hihihihi", "hihihihihi"]:
    print("Yes")
else:
    print("No")
s = input()

v = 'hi'

flg = True

while True:
  if len(s) <= 1:
    if len(s) == 1:
      flg = False
    break
  if s[:2] != v:
    flg = False
    break
  else:
    s = s[2:]

if flg:
  print('Yes')
else:
  print('No')
s=input()
l=len(s)
bo =True
if l%2==1:
	print("No")
else:
	x=int(l/2)
	for i in range(x):
		if s[2*i]!="h" or s[2*i+1]!="i":
			bo=False
			break
	if bo==True:
		print("Yes")
	else:
		print("No")
s = input()
s = s.replace("hi","")

if s == "":
  print("Yes")
else:
  print("No")
S =input()
if len(S) % 2 != 0:
    print('No')
    exit()
for i in range(0,len(S),2):
    if S[i:i+2] != 'hi':
        print('No')
        exit()
print('Yes')
s = input()
n = len(s)
if n % 2 == 1:
  print('No')
elif n % 2 == 0 :
  n = n // 2
  moji =''
  for i in range(n):
    moji += 'hi'
  if s == moji:
    print('Yes')
  else:
    print('No')
# A
S = input()

flag = 0
if len(S)%2!=0:
    flag=1
else:
    for i in range(len(S)//2):
        if S[i*2:i*2+2] != "hi":
            flag = 1
            break

if flag==0:
    print("Yes")
else:
    print("No")
str = input()

s_ans = 'Yes'
if len(str)%2 == 1:
    s_ans ='No'
else:
    for i in range(0,len(str),2):
        moji = str[i:i+2]
        if str[i:i+2] != 'hi':
            s_ans = 'No'
            break
print(s_ans)
import sys
#input = sys.stdin.buffer.readline

def main():
    s = input()
    if len(s)%2 != 0:
        print("No")
        exit()
    for i in range(len(s)//2):
        if s[2*i:2*i+2] != "hi":
            print("No")
            exit()
    print("Yes")
    
if __name__ == "__main__":
    main()
s = input()

hi_cnt = s.count('hi')

if hi_cnt == len(s) / 2:
  print("Yes")
else:
  print("No")
S = input()

if S.replace('hi', '') == "":
    print("Yes")
else :
    print("No")
s = input()
for i in range(len(s)):
    if i % 2 == 0 and s[i] != 'h':
        print("No")
        exit()
    if i % 2 == 1 and s[i] != 'i':
        print("No")
        exit()
    if len(s) % 2 == 1:
        print("No")
        exit()
print("Yes")
s = str(input())
if s == 'hi' or s == 'hihi' or s == 'hihihi' or s == 'hihihihi' or s == 'hihihihihi':
    print('Yes')
else:
    print('No')
S=str(input())
if len(S)%2 != 0:
  print("No")
  exit()
for i in range(int(len(S)/2)):
  if S[i*2]!="h":
    print("No")
    exit()
  if S[i*2+1]!="i":
    print("No")
    exit()
print("Yes")
s=input()
n=len(s)
if n%2!=0:
  print("No")
else:
  flag=True
  for i in range(0,n,2):
    if s[i]=='h' and s[i+1]=='i':
      continue
    else:
      flag=False
      break
  print("Yes") if flag else print("No")
S = input()
if S == "hi"*int(len(S)//2):
    print("Yes")
else:
    print("No")
s = input()
isHitachi = False
for i in range(1, 6):
    if s == 'hi'*i:
        isHitachi = True
        break
if isHitachi:
    print('Yes')
else:
    print('No')
import sys
import math
import collections
from collections import deque
#n = int(input())
#a, b = map(int, sys.stdin.readline().split())
s = input()
#x = sys.stdin.readline().split()

if len(s) % 2 != 0:
    print("No")
    sys.exit()


for i in range(int(len(s)/2)):
    if s[2 * i] == "h" and s[2 * i + 1] == "i":
        continue
    else:
        print("No")
        sys.exit()

print("Yes")
# -*- coding: utf-8 -*-
s = input()

if s == 'hi' or s == 'hihi' or s == 'hihihi' or s == 'hihihihi' or s == 'hihihihihi':
    print('Yes')
else:
    print('No')
import re

if __name__ == '__main__':

    s = input().strip()
    if re.match("^(hi)+$", s):
        print("Yes")
    else:
        print("No")
S = input()

kouho = ["hi", "hihi", "hihihi", "hihihihi", "hihihihihi"]

if S in kouho:
    print("Yes")
else:
    print("No")
s = input()

if s == "hi":
    print("Yes")
elif s == "hihi":
    print("Yes")
elif s == "hihihi":
    print("Yes")
elif s == "hihihihi":
    print("Yes")
elif s == "hihihihihi":
    print("Yes")
else:
    print("No")
s=input()
i=len(s)//2
x='hi'*i
if s==x:
  print('Yes')
else:
  print('No')
s = input()
print('YNeos'[s != len(s) // 2 * 'hi'::2])
S = input()

if len(S) % 2 != 0:
    print('No')
else:
    a = S.count('hi')
    if a == len(S) // 2:
        print('Yes')
    else:
        print('No')
S = input()
#print(S)
ss = S.split('hi')
#print(ss)
len_sum = sum([len(x) for x in ss])
#print(len_sum)
if len_sum == 0:
  print('Yes')
else:
  print('No')
s=input();print("Yes"if s=="hi"*(len(s)//2)else"No")
s=input()
a=len(s)//2
if a*2==len(s):
  st="".join(["hi"]*a)
  if st==s:
    print("Yes")
  else:
    print("No")
else:
  print("No")
S = input()
ans = False
for i in range(1, 6):
    if S == 'hi' * i:
        ans = True
        break
print('Yes' if ans else 'No')
f=0
s=list(input())
if len(s)%2==1:
    f=1
else:
    for i in range(len(s)):
        if i%2==1:
            if s[i]!='i':
                f=1
                break
        else:
            if s[i]!='h':
                f=1
                break
if f==0:
    print('Yes')
else:
    print('No')
z = input()

if z=='hi' or z=='hihi' or z=='hihihi' or z=='hihihihi' or z=='hihihihihi':
    print("Yes")
else:
    print("No")
s = input()
if s == 'hi' or s == 'hihi' or s == 'hihihi' or s == 'hihihihi' or s == 'hihihihihi' :
    print('Yes')
else :
    print('No')
S = input()
ans = 'Yes'
while len(S)>0:
  if S[:2]!='hi':
    ans = 'No'
    break
  S = S[2:]
print(ans)
S = input()
if len(S) %2 == 1:
  print("No")
  exit()
for i in range(len(S)):
  if S[i] != "hi"[i%2]:
    print("No")
    exit()
print("Yes")
# h, n, *L = map(int, open(0).read().split())
# a = map(int, input().split())
# i = int(input())
# a = [map(int, input().split()) for _ in range(i)]
# print(list(a))

# [(a,b) for a, b in zip(*[iter(L)] * 2)]


s = input()

ans = "Yes"
if len(s) % 2 != 0:
    print("No")
    exit()

for i in range(0, len(s) - 1, 2):
    str = s[i] + s[i + 1]
    if str == 'hi':
        continue
    ans = "No"

print(ans)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys
from collections import deque as deq
import re

S = input()

print('Yes' if re.match(r'^(hi)+$', S) else 'No')
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left #bisect_left(list, value)
#from fractions import gcd
enu = enumerate

sys.setrecursionlimit(10**7)
S = input()

for i in range(6):
    if 'hi'*i == S:
        print('Yes')
        exit()
else:
    print('No')
print("YNeos"["".join(input().split("hi"))!=""::2])
import sys

s = sys.stdin.readline().rstrip()

def main():
    l = len(s)
    if l & 1:
        return 'No'
    if s == 'hi' * (l // 2):
        return 'Yes'
    else:
        return 'No'

if __name__ == '__main__':
    ans = main()
    print(ans)
print("Yes" if input() in ["hi"*i for i in range(1,6)] else "No")
s = input()
flag = True
while True:
    if len(s) == 1:
        flag = False
        break
    if len(s) == 0:
        break
    if s[:2] == "hi":
        s = s[2:]
    else:
        flag = False
        break
if flag:
    print("Yes")
else:
    print("No")
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
def resolve():
    S = sr()
    if len(S)%2 == 1:
        print('No')
        return
    for i in range(len(S)):
        if (i%2 == 0 and S[i] == 'h') or (i%2 == 1 and S[i] == 'i'):
            continue
        print('No')
        return
    print('Yes')
resolve()
s=input()
hi=["hi","hihi","hihihi","hihihihi","hihihihihi"]

if s in hi:
  print("Yes")
else:
  print("No")
import sys
S = input()
if len(S) % 2 != 0:
    print("No")
    sys.exit()

for i in range(0,len(S),2):
    if S[i:i+2] != "hi":
        print("No")
        sys.exit()
print("Yes")
S = input()
ans  = "Yes"
l = len(S)
if l % 2 == 1:
    ans = "No"
for i in range(l):
    if i % 2 == 0:
        if S[i] !="h":
            ans ="No"
    else:
        if S[i] !="i":
            ans ="No"
print(ans)
S = input()

Sa = S.split('hi')
Sa = ''.join(Sa)
if len(S) != len(Sa) and len(Sa) == 0:
    print('Yes')
else:
    print('No')
from sys import stdin
def main():
	readline=stdin.readline
	S=readline().strip()
	hflag=False
	iflag=True
	for i in range(len(S)):
		if S[i]=="h" and iflag:
			hflag=True
			iflag=False
		elif S[i]=="i" and hflag:
			iflag=True
			hflag=False
		else:
			print("No")
			break
	else:
		if hflag==False and iflag:
			print("Yes")
		else:
			print("No")
if __name__=="__main__":
	main()
import sys

s = sys.stdin.readline().strip()

if s.replace("hi", "") == "":
    print("Yes")
else:
    print("No")
s=input()

test=["hi"*i for i in range(10)]

ans="No"
for t in test:
    if s==t:
        ans="Yes"
print(ans)
s = input()
n = len(s)
pr =s[0]
ls = ["h","i"]
cnt = 0
for i in range(n):
    pr = s[i]
    if pr == ls[cnt]:
        pass
        cnt = (cnt+1)%2
    else:
        print("No")
        exit()
if pr == "i":
    print("Yes")
else:
    print("No")
S=input()

print('Yes' if S.replace('hi','')=='' else 'No')
import re

s = input()

m = re.match(r'^(hi)*$', s)
if m is not None and m.group(0):
  print("Yes")
else:
  print("No")
s = input()
if len(s) % 2 == 1:
  print('No')
  exit()
for i in range(len(s)//2):
  #print(s[2*i:2*i+2])
  if s[2*i:2*i+2] != 'hi':
    print('No')
    break
else:
  print('Yes')
s=str(input())

if s=="hi" or s=="hihi" or s=="hihihi" or s=="hihihihi" or s=="hihihihihi":
  print("Yes")
else:
  print("No")
a = input()
if(a.find("hi")!=-1):
    print("Yes")
else:
    print("No")
s = list(input())
c = 0
for i in range(len(s)-1):
    if s[i] == "h" and s[i+1] == "i":
        c += 1
if c >= 1:
    print("Yes")
else:
    print("No")
S = list(input())
for i in range(len(S) - 1):
    if S[i:i + 2] == ["h","i"]:
        print('Yes')
        exit()
if S == ["h","i"]:
    print("Yes")
else:
    print("No")
import re
S = input()
liS = re.split('(..)', S)[1::2]

for x in liS:
    if x == 'hi':
        pass
    else:
        print('No')
        exit()

print('Yes')
if 'hi' in input():
  print('Yes')
else:
  print('No')
while True:
    s = input()
    if 1 <= len(s) <= 10:
        break

flag = False

for l in range(len(s)):
    print(s[len(s)-2] + s[len(s)-1])
    if s[len(s)-2]=="h" and s[len(s)-1]=="i":
        print("Yes")
        flag = True
        break
    
    if s[l]=="h" and s[l+1]=="i" and s[l+2]!="i":
        print("Yes")
        flag = True
        break
        
    
if flag == False:
    print("No")
S = input()
s = list(S)
k = []
a = len(s) % 2
if a == 0:
    for i in range(a):
        t = [s[i * 2],s[i * 2 + 1]]
        result = ''.join(t)
        k.append(result)
        
    
    #print(k)
    n = 0
    for j in range(a):
        if k[j] == "hi":
            n = n + 1
    if n == a:
        print("Yes")
    else:
        print("No")
else:
    print("No")
S=input()
while len(S)>=2:
  if S[:2]=='hi':
    S=S[2:]
  else:
    break
if len(S)==0:
  print('YES')
else:
  print('NO')
input_line = input()
Line = list(input_line)

flag = 0

for i in Line:
    # print(i)

    if i == "h" and flag == 0:
        flag = 1
    elif i == "i" and flag ==1:
        flag = 0
    else:
        flag = 2
        print("No")

if flag == 1:
    print("No")
elif flag == 0:
    print("Yes")
s = input()
if 'hi' not in s:
    print('No')
elif 'hii' in s:
    print('No')
else:
    print('Yes')
s=input()
print(len(s))
for i in range(len(s)):
    if s[i]=="h":
        if i<len(s)-1:
            if s[i+1]=="i":
                print("Yes")
                break
print("No")
s=input()
if 'hi' in s:
    print('Yes')
else:
    print('No')
S=input().strip()

for i,word in enumerate(S):
  if (i%2==0 and word=="h") or (i%2==1 and word=="i"):
    continue
  else:
    print("No")
    break

else:
  print("Yes")
n = input()
l = n.replace("hi","a")

print("No" if len(set(l)) != 1 else "Yes")
def resolve():
    S = input()
    c = list(S)
    if len(c) <= 1:
        print('No')
        return

    if len(c) == 2 and S != 'hi':
        print('No')
        return

    for i in range(0, len(c) - 2, 2):
        if ''.join(c[i:i + 2]) != 'hi':
            print('No')
            return
    print('Yes')


resolve()
def solve():
  s=list(input())
  if(len(s)<2):
      print("No")
      return
  for i in range(len(s)):
      if (i%2==0 and s[i]!='h'):
          print("No")
          return
      elif(i%2==1 and s[i]!='i'):
          print("No")
          return
  print("Yes")

solve()
S = input()
ans = 'No'

if len(S)%2 == 0:
    for i in range(len(S)//2):
        if S[i]+S[i+1] != 'hi':
            break
        elif i == (len(S)//2)-1:
            ans = 'Yes'
print(ans)
S = input()

if "hi" in S:
    print("Yes")
else:
    print("No")
for i, s in enumerate(input()):
    if i % 2:
        if s != "i":
            print("No")
            break
    else:
        if s != "h":
            print("No")
            break
else:
    print("Yes")
S = str(input())
l = len(S)
k = 0
for i in range (l - 1):
    if S[i] == "h":
        if S [i + 1] == "i":
            k = 1
if k == 0:
    print("No")
else:
    print("Yes")
import sys
s = list(input())
c = len(s)
if c%2 == 1:
    print("No")
    sys.exit()
else:
    for i in range(c//2):
        if not s[2*i] == "h" and s[2*i+1] == "i":
            print("No")
            sys.exit
print("Yes")
s = list(input())
a = 0
for i in range(len(s)):
  if i%2 == 0:
    if s[i] == "h":
      continue
    else:
      a += 1
  elif i%2 == 1:
    if s[i] == "i":
      continue
    else:
      a += 1
if a == 0:
  print("Yes")
else:
  print("No")
s = input()
s = s.split('hi')
s = set(s)
if len(s) == 1:
  print("Yes")
else:
  print("No")