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 (Clang 3.8.0) (judge verdict: Accepted)

#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
static int desc(const void *a, const void *b);
static int asc(const void *a, const void *b);
 
int main (void){
    int n,k,i,j;
    int x,y,z;
    int count = 0;
    double dx;
    int box[200001]={};
    char text[200001]={};
    char s[200001]={};
    char t[200001]={};
    char alf[256] = {"abcdefghijklmnopqrstuvwxyz"};
    char alfb[256] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};
    char sample_text[256];

    // Input Area //
    //scanf("%d %d",&x,&y);
    scanf("%s",s);
    //scanf("%d %d",&x,&y);
    //scanf("%s",text);
 
    /*
    if(strcmp(text,s)==0){
        x--;
    }else if(strcmp(text,t)==0){
        y--;
    }
    */
    i = 0;
    n = 0;
    while(1){
        if (s[i] == '\0' || n == 1){
            break;
        }
        
        if (s[i] == 'h' && s[i + 1] == 'i'){
            i = i + 2;
        }else{
            n = 1;
        }
    }
    
    if (n == 0){
        printf("Yes");
    }else{
        printf("No");
    }
    
    //printf("%d %d",x,y);
    //scanf("%s",&sample_text);
    //scanf("%s",&text);
 
    /*
    scanf("%d",&n);
    for(i = 0; i < n; i++){
        scanf("%d",&box[i]);
    }
    for(i = 0; i < n; i++){
        printf("%d",box[i]);
    }
    printf("\n");
    qsort(box,n,sizeof(int),desc);
    
    */
    // Output Area //
    
    /*
    for(i = 0; i < n; i++){
        printf("%d",box[i]);
    }
    */
 
}
 
static int desc(const void *a, const void *b){
    return *(int *) b - *(int *) a;
}
 
static int asc(const void *a, const void *b){
    return *(int *) a - *(int *) b;
}
 
 
/* KonoLvBANK
 
配列降順ソート
qsort(box,n,sizeof(int),desc);
配列昇順ソート
qsort(box,n,sizeof(int),asc);
 
アルファベットを次の単語に変えるやつ
    while(1){
        if (text[i] == '\0'){
            break;
        }
        for(j = 0; j < 26; j++){
            if (text[i] == alf[j]){
                if (j != 25){
                    text[i] = alf[j + 1];
                }else{
                    text[i] = alf[0];
                }
                break;
            }
        }
        i++;
    }
    */