Problem:


Score : 100 points

Problem Statement

A Hitachi string is a concatenation of one or more copies of the string hi.

For example, hi and hihi are Hitachi strings, while ha and hii are not.

Given a string S, determine whether S is a Hitachi string.

Constraints

The length of S is between 1 and 10 (inclusive).

S is a string consisting of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If S is a Hitachi string, print Yes; otherwise, print No.

Sample Input 1

hihi

Sample Output 1

Yes

hihi is the concatenation of two copies of hi, so it is a Hitachi string.

Sample Input 2

hi

Sample Output 2

Yes

Sample Input 3

ha

Sample Output 3

No



Sample input:
hihi


Sample output:
Yes

Submission status: Runtime Error

Solution code:

if __name__ == "__main__":
    S = input()
    for i in range(0, len(S), 2):
        if len(S) >= 1 and S[i] == "h" and S[i+1] == "i":
            ret = "Yes"            
        else:
            ret = "No"
    print(ret)

Submission status: Runtime Error

Solution code:
import re
s = input()
isHitachi = re.search("^(hi)+$")
if isHitachi:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S=input()
ans="Yes"
if len(S)%2==1:
    ans="No"
else:
for i in range(len(S)):
    if i%2==0:
        if S[i]!="h":
            ans="No"
            break
    if i%2==1:
        if S[i]!="i":
            ans="No"
            break
print(ans)

Submission status: Runtime Error

Solution code:
s = input()

ans = True

if len(s) == 1:
    print('No')
    exit(0)

while len(s) > 0:
    if s[0] == 'h' and s[1] == 'i':
        s = s[2:]
    else:
        ans = False
        break

if ans:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
S = list(input())
len = len(S)
flag = 1
s = S[0]


for i in range(1, len):
    if S[1] == null:
        break
    if s == 'h':
        if S[i] != 'i':
            flag = 0
            break
    if s == 'i':
        if S[i] != 'h':
            flag = 0
            break
    s = S[i]

if flag == 1:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
s = input()
flag = False
if "hi" in s:
    if s[s.find("hi")+2] == "i":
        flag = False
    else:
        flag = True
else:
    flag = False
    
if flag == False:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
s=input()
cnt=0
ans="No"
flag=True
while cnt<len(s):
  if s[cnt]=="h" and s[cnt+1]=="i":
    cnt+=2
    continue
  else:
    flag=False
    break
if flag:
  ans="Yes"
print(ans)

Submission status: Runtime Error

Solution code:
s = input()
if s.replace('hi','') == '':
    print('Yes')
else
    print('No')

Submission status: Runtime Error

Solution code:
S = input()
hitachi = 'hi'
i = 1
 
while True:
  corect = hitachi * i
  if S == corect:
  	print('Yes')
    break
  i += 1
  if i == 20:
    print('No')
    break

Submission status: Runtime Error

Solution code:
S=input()
ans="Yes"
if S%2==1:
    ans="No"
else:
    for i in range(len(S)):
        if i%2==0:
            if S[i]!="h":
                ans="No"
                break
        if i%2==1:
            if S[i]!="i":
                ans="No"
                break
print(ans)

Submission status: Runtime Error

Solution code:
S = list(input())
ans = 0
if len(S)>=2:
    for i in range(0, len(S), 2):
        if S[i]!="h" or S[i+1]!="i":
            ans += 1
    if ans==0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s = input()

i = 0
while i < len(s):
    if(s[i] == 'h' and s[i+1] == 'i'):
        ans = "Yes"
    else:
        ans = "No"
    i += 2

print(ans)

Submission status: Runtime Error

Solution code:
s = input()

if s[0] == "h" and s[1] == "i" and s[1] != s[2]:
    print("Yes")

else:
    print("No")

Submission status: Runtime Error

Solution code:
S = input()
hitachi = 'hi'
i = 1
 
while True:
  corect = hitachi * i
  if S == hitachi:
  	print('Yes')
    break
  i += 1
  if i == 20:
    print('No')
    break

Submission status: Runtime Error

Solution code:
S = str(input())
if "hi" = S:
  print("Yes")
elif "hihi" = S:
  print("Yes")
elif "hihihi" = S:
  print("Yes")
elif "hihihihi" = S:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S=input()
n=len(S)
if n==2:
  if S=='hi':
    print('Yes')
  else:
    print('No')
elif n==4:
   if S=='hihi':
    print('Yes')
  else:
    print('No')
elif n==6:
  if S=='hihihi':
    print('Yes')
  else:
    print('No')
elif n==8:
   if S=='hihihihi':
    print('Yes')
  else:
    print('No')
elif n==10:
   if S=='hihihihihi':
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
hantei = True

for i in range(0,len(S),2):
  if S[i]+S[i+1] != 'hi':
    hantei = False

if hantei == True:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
from fractions import gcd
# from datetime import date, timedelta
# from heapq import *
import heapq
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def lcm(a, b):
    return a * b / fractions.gcd(a, b)


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def is_prime(n):
    if n == 1:
        return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True


def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

def modpow(a, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * a % mod
        a = a * a % mod
        n >>= 1
    return res


def modinv(a, mod):
    return modpow(a, mod - 2, mod)


def cnk(a, b):
    MOD = 10**9+7
    ret = 1
    for i in range(b):
        ret *= (a-i)
        ret %= MOD
        ret = ret * modinv(i+1, MOD) % MOD
    return ret


class UnionFind:
    def __init__(self, n):
        self.sz = [-1 for i in range(n)]

    # 検索
    def find(self, x):
        if self.sz[x] < 0:
            return x
        else:
            self.sz[x] = self.find(self.sz[x])
            return self.sz[x]

    # 併合
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return False
        if self.sz[x] > self.sz[y]:
            x, y = y, x
        self.sz[x] += self.sz[y]
        self.sz[y] = x

    # 同じ集合に属するか判定
    def same(self, x, y):
        return self.find(x) == self.find(y)

    # xが含まれている集合のサイズを求める
    def size(self, x):
        return -self.sz[self.find(x)]


def main():
    s = input()
    f = False
    for i in range(0 , len(s),2):
        if s[i] == "h" and s[i + 1] == "i":
            pass
        else:
            print("No")
            exit()


    print("Yes")
  


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
S = input()
ans = True
for i in range(0,len(S),2):
  if S[i] != "h" or S[i+1] != "i":
    ans = False
    break

if ans:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:

if __name__ == "__main__":
    S = input()
    for i in range(0, len(S), 2):
        if S[i] == "h" and S[i+1] == "i":
            ret = "Yes"            
        else:
            ret = "No"
    print(ret)

Submission status: Runtime Error

Solution code:
S = input()
hitachi = 'hi'
i = 1

while True:
  corect = hitachi * i
  if S == hitachi:
  	print('Yes')
    break
  i += 1
  if i == 20:
    print('No')

Submission status: Runtime Error

Solution code:
S = list(input())
ans = 0
for i in range(0, len(S), 2):
    if S[i]!="h" or S[i+1]!="i":
        ans += 1
if ans==0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S=input()

i=0
flag=0
while i<len(S):
    if S[i] == 'h' and S[i+1] == 'i':
        i=i+2
    else:
        flag=1
        i=len(S)

if flag==0:
    print('Yes')
elif flag==1:
    print('No')

Submission status: Runtime Error

Solution code:
if ("hi" in str(S)):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
string = input()
for i in range(len(string)):
    if i % 2 == 0:
        if string[i] == 'h':
            continue
        else:
            print('No')
            break
    elif i % 2 == 1:
        if string[i] == 'i':
            continue
        else:
            print('No')
            break
else:
  	if len(string) == 1:
      	print('No')
    else:
    	print('Yes')

Submission status: Runtime Error

Solution code:
s = input()

ans = True

while len(s) > 0:
    if s[0] == 'h' and s[1] == 'i':
        s = s[2:]
    else:
        ans = False
        break

if ans:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:

# Author: cr4zjh0bp
# Created: Sun Mar  8 11:28:28 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

s = ns()
n = len(s)
cnt = True
i = 0
flag = True
if n == 1:
    print("No")
else:
    while i < n:
        if s[i] != 'h' or s[i + 1] != 'i':
            flag = False
            break
        i += 2

    if flag:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
def resolve():
    str = input()
    if re.match('(hi)+', str):
        print("Yes")
    else:
        print("No")

resolve()

Submission status: Runtime Error

Solution code:
s = input()
if "hi" in s:
    if s[s.find("hi")+2] == "i":
        flag = False
    else:
        flag = True
else:
    flag = False
    
if flag == False:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
s = list(input())
flag =True
for i in range(len(s)):
  if s[i] == 'h':
    if s[i+1] == 'i':
      flag =True
    else:
      flag =False
  else if s[i] == 'i':
    if s[i+1] == 'h':
      flag =True
    else:
      flag =False
  else:
    flag =False
if flag:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
s=input()
a=s.count("hi")
b=len(s)
if b/a==2:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S = input()

if len(S) < 2:
    print('No')
    return

s = S.replace('hi', '')

# print(S)
print('Yes' if len(s) < 1 else 'No')

Submission status: Runtime Error

Solution code:
s = input()
if 'hi' in s:
  print('Yes')
elif: 'hii' in s:
  print('No')
else:
  print('No')

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):
    n = 0
    while n != len(S):
        if n % 2 == 1:
            break
        if S[n] == "h" and S[n+1] == "i":
            n += 2
        else:
            break
    if n == len(S):
        print(YES)
    else:
        print(NO)


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
S=input()

i=0
flag=0
while i<len(S):
    if S[i] == 'h' and S[i+1] == 'i':
        i=i+2
    else:
        print('No')
        flag=1
        i=len(S)

if flag==0:
    print('Yes')

Submission status: Runtime Error

Solution code:
import sys
s=input()
l=len(s)
if l==1:
  print('No')
  sys.exit()
for i in range(0,l,2):
  if s[i]=='h':
    if s[i+1]!='i':
      print('No')
      sys.exit()
  else:
    print('No')
    sys.exit()
print('Yes')

Submission status: Runtime Error

Solution code:
S = input()

i = 0
while i + 1 <= len(S):
    if S[i] == 'h' and S[i+1] == 'i':
        i += 2
    else:
        break

if i == len(S):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
if ("hi" in S):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = list(input())
N = len(S)

if N == 1:
    print('No')
    exit()
for i in range(0,N,2):
    if S[i] != 'h' or S[i+1] != 'i':
        print('No')
        exit()

print('Yes')

Submission status: Runtime Error

Solution code:
s = input()

count = len(s) / 2

if s == 'hi' * count:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
# Author: cr4zjh0bp
# Created: Sun Mar  8 11:28:28 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

s = ns()
n = len(s)
cnt = True
i = 0
flag = True
while i < n:
    if s[i] != 'h' or s[i + 1] != 'i':
        flag = False
        break
    i += 2

if flag:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s=input()
if s='hi' or s='hihi' or s='hihihi' or s='hihihihi' or s='hihihihihi':
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
s=input()
for i in range(len(s)-1):
    if(s[i]=='h'):
        if(s[i+1]=='i'):
            continue
        else:
            print('No')
            exit()
    elif(s[i]=='i'):
        if(s[i+1]=='h'):
            if(s[i+2]=='i'):
                continue
            else:
                print('No')
                exit()
        else:
            print('No')
            exit()
    else:
        print('No')
        exit()
print('Yes')

Submission status: Runtime Error

Solution code:
import java.util.*;
import java.math.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean res = true;
    char[] a = s.toCharArray();
    for(int i = 0; i < a.length; ++i) {
      if((i & 1) == 0) {
        if(a[i] != 'h') res = false;
      } else {
        if(a[i] != 'i') res = false;
      }
    }
    if(a.length % 2 != 0) res = false;
    if(res) System.out.println("Yes");
    else System.out.println("No");
  }
}

Submission status: Runtime Error

Solution code:
import sys
s=input()
l=len(s)
for i in range(0,l,2):
  if s[i]=='h':
    if s[i+1]!='i':
      print('No')
      sys.exit()
  else:
    print('No')
    sys.exit()
print('Yes')

Submission status: Runtime Error

Solution code:
hitachi = True
s = input()
for i in range(0, len(s), 2):
    if(s[i] != 'h' or s[i + 1] != 'i'):
        hitachi = False
        break
if(hitachi):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
S = input()
is_hitachi = True
if len(S) >= 2:
    for i in range(0, len(S), 2):
        if not (S[i] == 'h' and S[i + 1] == 'i'):
            is_hitachi = False
    print('YNeos'[not is_hitachi::2])
else:
    print('No')

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):
    n = 0
    while n != len(S):
        if S[n] == "h" and S[n+1] == "i":
            n += 2
        else:
            break
    if n == len(S):
        print(YES)
    else:
        print(NO)


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for (ll i = 0; i < (n); i++)
typedef pair<int, int> P;

ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}


int main(){
    string s;
    cin >> s;
    bool ok = true;
    if(s.size()%2==0){
        for(int i = 0; i < s.size()/2; i++){
            if(s[2*i]=='h'&&s[2*i+1]=='i'){
                continue;
            }else{
                ok = false;
                break;
            }
        }
        if(ok){
            cout << "Yes" << endl;
            return 0;
        }

    }

    cout << "No" << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
import numpy as np
import fractions

s=str(input())
for i in range(len(s)):
    if(i%2==0):
        if(s[i]!='h' or s[i+1]!='i'):
            print("No")
            exit(0)
    if(s[i]!='h' and s[i]!='i'):
        print("No")
        exit(0)
print("Yes")

Submission status: Runtime Error

Solution code:
import java.util.*;
import java.math.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    boolean res = true;
    char[] a = s.toCharArray();
    for(int i = 0; i < a.length; ++i) {
      if((i & 1) == 0) {
        if(a[i] != 'h') res = false;
      } else {
        if(a[i] != 'i') res = false;
      }
    }
    if(a.length % 2 != 0) res = false;
    if(res) System.out.println("Yes");
    else System.out.println("No");
  }
}

Submission status: Runtime Error

Solution code:
S=str(input())

if ('hi' in S):
    print('Yes')
elif ('hii' in S)
    print('No')
else:
    print('No')

Submission status: Runtime Error

Solution code:
import re
isHitachi = re.search("(hi)+")
if isHitachi:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = list(input().split())
ans = "No"
if len(S) == 1:
    ans = "No"
else:
    for i in range(len(S)-1)
        if S[i] == "h":
            if S[i+1] == "i":
                ans = "Yes"

print(ans)

Submission status: Runtime Error

Solution code:
S = list(input())

if len(S)%2 != 0:
  print("No")
else:
  for i in range(len(S)):
    if (i%2 == 0 & S[i] != "h") or (i%2 == 1 & S[i] != "i"):
        print("No")
        break
  else:
   	print("Yes")

Submission status: Runtime Error

Solution code:
s = str(input())
for i in range(0,len(s),2):
    if s[i] == 'h' and s[i+1] == 'i':
        continue
    else:
        print("No")
        exit()
print("Yes")
# n = int(input())
# ans = 0

# for i in range(n):
#     print(i)


# print(ans)

Submission status: Runtime Error

Solution code:
S = input()
if S == hi or S == hihi or S == hihihi or S == hihihihi or S == hihihihihi:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n = str(input())
ans = 'Yes'
if len(n)%2 == 1:
    ans = No
else:
    for i in range(0, len(n)-1, 2):
        if n[i] != 'h' or n[i + 1] != 'i':
            ans = 'No'

print(ans)

Submission status: Runtime Error

Solution code:
S = list(input())
N = len(S)
for i in range(0,N,2):
    if S[i] != 'h' or S[i+1] != 'i':
        print('No')
        exit()

print('Yes')

Submission status: Runtime Error

Solution code:
# import sys
# import math
# import decimal
# import queue
# import bisect
# import heapq
# import time
# import itertools
# import collections # queue
# from fractions import Fraction

mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def main():
    s = input()
    for i in range(0,len(s),2):
        if s[i]!='h' or s[i+1]!='i':
            print('No')
            return
    print('Yes')
    return

if __name__=='__main__':
    main()

Submission status: Runtime Error

Solution code:
s = list(input())

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

print("Yes")

Submission status: Runtime Error

Solution code:
S = input()
is_hitachi = True
for i in range(0, len(S), 2):
    if not (S[i] == 'h' and S[i + 1] == 'i'):
        is_hitachi = False
print('YNeos'[not is_hitachi::2])

Submission status: Runtime Error

Solution code:
S = input()

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

Submission status: Runtime Error

Solution code:
 s=input()
n=len(s)
if s=="hi"*(n//2):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = input()
if S == "hi" or S == "hihi" or S == "hihihi" or S = "hihihihi" or S == "hihihihihi":
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = input()
j = True
for i in range(0,len(S),2):
    if S[i] != 'h' or S[i+1] != 'i':
        j = False
        break
print('Yes' if j else 'No')

Submission status: Runtime Error

Solution code:
    s = input()
    s.replace('hi', '')
    if len(s) == 0:
    print("YES")
    else:
    print("NO")

Submission status: Runtime Error

Solution code:
S = input()
if(S == "hi"orS == "hihi"orS == "hihihi"orS == "hihihihi"orS == "hihihihihi"):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
/* Aa^~ kokoro ga pyonpyon suru n jaa^~
// ZZZXXkXkkkZ!``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```?Wfpppbpbbpbbpbbbkbkk
// ppbbbpbbpVr`` `` ` ` ` ` ```` `` ` ` ``  ` ` ` ` ` ` ` ` `  dppbbkkkkkkkkkkqkqkk
// HkqqqqqkkWr`` ` ` ``` ``` `?G, ` ` ``.JC!```` ` ` `` `` ````(Wpbkkkkkkkkqkkkkkqk
// mmmmmqqqqpr` `` `` ```````.+zT=`` `` 7TO-.```````` `` `` ```(yppbkkkkkkkkkkkkkkk
// ggmgmmqqqH$ ``````````....````` `  ````````.`````` `` ``````.yfpppbbbbkkkkqqqqqH
// gmmmmmqqqkW<```` `````...`````  .,.`  ````....````` ``````` (Wbqqmgmmgmggggggggg
// qmmmqqqqkkWk.``````````````````` ;:<`` `````.`````````````-_<-?WHHqmmmmmmgmmgggg
// @@@@@@@gggHH6- ``````````````` `` _ `` ```````````````` ._~~_.`-?Wkqmmmmmmmggg@g
// @@@@g@gggHY~.-<_- `````````````````````````````````` ._~~(<-``.`.(WHqqqmmggggmmm
// @@g@gggHH=.`..._<-___..```````````````````````. .-_~~~_(!``-.``.`` OHHWUWHmqHWXW
// gggggmqK1.``..~.. _<<+-(____..  ````````  ..__~~_((<<!.`.``` .``.`` j0C1XUHmHIdW
// ggmmqH0!,_``.>`````` _<<;<v<<<++((((((((((<<<<<<~_. (-.``~``.>..```  jOuWHHqHIdH
// gmmqkW!`(_ J>`    `` ` _~<`_~~~~<<<<<<<~~__````````` ?1. ._`(__```    zXWHg@HkXH
// gHHWS{``(lJ<!``.``.```(:+>`._`````.` <..`` - ``. `   _ ?&._.I`_`````` .XyVfppppW
// HHHSv``.(X:_..... _..(;+<!.(<..-.....-.-_..+_`..<.`.`..`_IJd}  .`..````jqg@@@@@@
// XHWZ{..<Jk~!.`.. (<.-(+>(_.(1.(_..`.`.`.<_.+<_..<<-..._..-zy>.`_`...```.WH@HHHHH
// bkWt~.-jCz(_..`.(+<.(;< ._-<=_(<_..-....(_.<1<..(<<.`._..-JUS-._.`...```dHmH9VUH
// WUUO..(f.(c...__+z<-(+~` _-+<_(><..__.`.(<._.z_.(1;_..__.(C(zT-(..`...``(WHR<+Xk
// kkkk._(_.->..._(z;:_><.._>_+_<(1>_._<...(v<<.(<.(+z<..-_(Z~_<_j+_..`...`(WHKz1ZW
// @@gR._+_..~..-<+z<<?<>```_.<_.(+1><_;_..(1_:`.<<??1z--(+Z!..<_.j<....`..(bgHAAQX
// @@mR.(j:..~.._<z!`.(>~``` ~(_.(+<1><><_.(((_`.<__`.<_.(X>...<_.(<.....`.JUWWWyWW
// @gmH_(zl..(.._+>```<+_````.~>``(+.<?>>_._(<```(<<``(__<>....<.._<.......dXkkkHHH
// mmqHl(dk_.(_.-=~`.`.1-..._~-1.``_:`(??<_~(`.--.&_.`.<(;<...._.._<..`..._Xg@@@@@@
// qHkpk(dX<.(;..j_```.(((JJ&a&-~``````.1<_```-(((e+.-(/`(>...._..(<......(Wmggg@@g
// HVHbWcz><__+_.(_.(dWWHHH@HHc~````````.+~`` (jHMMMHHHm&.?..._<..(<_..._.(WqqHHmHg
// 0>vWWkzZwl~<o.__`__~X@@HM@Hb ```.`.``. ```` d@@HHH@@K?76...(<..(<_...(_(ppWWWWHq
// X0XWHKXXw$<(z<.( `` WHHMHHHH_``````````````.WHHMNMHHH_`(...(<_.(z_..._<(fWVC174W
// XuXWHHWWz>__+z+.!`..??CZYCOX_`````````````.`~.OvTUZUS_`~.._+?_.(_~_.._zjO=1+~+jy
// kkkkkkkkX:._<z=1(_`` << ``->``.``.``.``.```` ?<`` (v!`._..(??_.(1._.._=dUOOzzzwX
// @@@@@@@@H<...1O=v<_...__ -_````````````````.`` `` ~.`` :.~+=?~.(;_(...jdQQQQQkkk
// H@@@@@@@H~...(==>.~~~~~....`.`````````.`````.`........->.(===~~<<.(...(dg@@@@@@@
// @@@H@@HHH_.__(=l>~.~~~~~....``.``.``.```..`......~~~~~(<_+=l=~_<.->..~_dqggggg@g
// @H@@@@MHH_._<(=l>...........```````````````.`...~~~~~~+<(=lz=~((j=z_..~jWqmmgggm
// @@H@@HHWH_._<(lll-.......```.````.``.`..`````........_z<+llZz~(lOO=<...(VYUUUW9Y
// @@HMMHWZf>~_=:=llw+.`````````.`.```__~~_``.`````.....(z+llOOz_zllOlz~..~<<1+dW>_
// MMM#MHHWXl~_=>1ltwOl&.`.``.`````.``````````````.````.(llttwtz(OltwOz<..__zwOwwOz
// HM#HMHUUI<._1z+ttOZttlt&....``.``.`.````.``...``...(zZtttOktzjttttwlz_._<(Xkkkkk
// HHHmHSZu:(_~+OztttXtttOZZttO+-..............-(+ztOttwttttd0tOZttttwOl<~.(_dMMHHH
// rvuuXuuI~~<~(uttttwvOwwwkQQHMMHHHHHHHHHMMMNmgey?OwwwrtttwXOtwttttttXtO-~.((wZyyy
// HHHHHHK>(~(-(dOrtrrl(QgMHMMMHHHHHHHHHHHHHHHH##HMNkX0rrrrXXrd%`` (Ctwwtz_~.<(Wg@H
// NNNNNHD(~(zo~zXrrrQdHHMMNMHHHHHHHHHHHHHHHHHHHHHH##HNmyrdKkwZ ` _``-zwrt1~~_<(MNM
// MMMMM#<<_jwr:(Z4QHHMMHMHHHHHHHHHHHHHHHHHHHHHHHHHHHH###NHSXZ>` ~````.OXtt>~._<?MM
*/

#include <bits/stdc++.h>
using namespace std;

using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using LL = long long;
using VL = vector<LL>;
using VVL = vector<VL>;
using PLL = pair<LL, LL>;
using VS = vector<string>;

#define ALL(a)  begin((a)),end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define MT make_tuple
#define SZ(a) int((a).size())
#define SORT(c) sort(ALL((c)))
#define RSORT(c) sort(RALL((c)))
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

#define FF first
#define SS second

template<class S, class T>
istream& operator>>(istream& is, pair<S,T>& p){
  return is >> p.FF >> p.SS;
}
template<class T>
istream& operator>>(istream& is, vector<T>& xs){
  for(auto& x: xs)
	is >> x;
  return is;
}
template<class S, class T>
ostream& operator<<(ostream& os, const pair<S,T>& p){
  return os << p.FF << " " << p.SS;
}
template<class T>
ostream& operator<<(ostream& os, const vector<T>& xs){
  for(unsigned int i=0;i<xs.size();++i)
	os << (i?" ":"") << xs[i];
  return os;
}
template<class T>
void maxi(T& x, T y){
  if(x < y) x = y;
}
template<class T>
void mini(T& x, T y){
  if(x > y) x = y;
}
void debug(istringstream&){}
template <char sep=',', class Head, class... Tail>
void debug(istringstream& iss, Head&& head, Tail&&... tail)
{
  string name;
  getline(iss, name, ',');
  cout << sep << name << "=" << head;
  debug(iss, forward<Tail>(tail)...);
}

#ifdef PYONPOI
#define DEBUG(...) \
  do{ \
    istringstream ss(#__VA_ARGS__); \
    debug<' '>(ss, __VA_ARGS__); \
    cout<<endl; \
  }while(0)
#else
#define DEBUG
#endif
void init_io(int argc, char* argv[]){
  cin.tie(0);
  ios_base::sync_with_stdio(false);
#ifdef PYONPOI
  if(argc > 1) {
    ifstream *ifs = new ifstream();
    ifs->open(argv[1]);
    cin.rdbuf(ifs->rdbuf());
  }
#endif
}


const double EPS = 1e-10;
const double PI  = acos(-1.0);
const LL MOD = 1e9+7;

int main(int argc, char* argv[]){
  init_io(argc, argv);

  string S;
  cin >> S;

  bool ok = true;
  for(int i=0;i<SZ(S);i+=2){
    if(S.substr(i, 2) != "hi") ok = false;
  }
  cout << (ok ? "Yes" : "No") << endl;

  return 0;
}