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

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include<bits/stdc++.h>
using namespace std;
using namespace std::chrono; 
#define ll long long
#define fo(i,v,e) for(v=i;v<e;v++)
#define pb(x) push_back(x)
#define pll pair<ll,ll>
#define pii pair<int,int>
#define fi first 
#define se second
#define vl vector<ll>
#define vi vector<int>
#define vb vector<bool>
#define all(v) v.begin(),v.end()
#define sz(x) (int)x.size()
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
 
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x);
#else
#define deb(x...)
#endif

vector<ll> sieveOfErthnosis(ll n)
{
    vector<bool>flag(n+5,false);
    vector<ll>primes;
    for(int i=2;i*i<=n;i++)
    {
        if(!flag[i])
        {
            for(int j=i*i;j<=n;j+=i)
            {flag[j]=true;}
        }
    }
    for (int  i = 2; i < n+1; i++)
    {
        if(!flag[i])primes.pb(i);
    }
    return primes;
}
void solve()
{
  ll n,i,j;
  string s,res="";cin>>s;
  n = sz(s);
  while(sz(res)<n)
  {
      res+="hi";
  }
  if(s==res)
  {
      cout<<"Yes";
  }
  else
  {
      cout<<"No";
  }
  
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    #ifndef ONLINE_JUDGE
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);
    #endif
    auto start = high_resolution_clock::now(); 
    int T = 1;  
    // cin>>T;
	while(T--)
	{
		solve();
	}
    auto stop = high_resolution_clock::now(); 
	auto duration = duration_cast<microseconds>(stop - start); 
    #ifndef ONLINE_JUDGE
	// cout << "time taken : "<<duration.count()<<" ms" << endl;
     #endif
}