Vasya collects coins: he has exactly one coin for every year from 1 to *n*. Naturally, Vasya keeps all the coins in his collection in the order in which they were released. Once Vasya's younger brother made a change — he took all the coins whose release year dated from *l* to *r* inclusively and put them in the reverse order. That is, he took a certain segment [*l*, *r*] and reversed it. At that the segment's endpoints did not coincide. For example, if *n* = 8, then initially Vasya's coins were kept in the order 1 2 3 4 5 6 7 8. If Vasya's younger brother chose the segment [2, 6], then after the reversal the coin order will change to 1 6 5 4 3 2 7 8. Vasya suspects that someone else could have spoilt the permutation after his brother. Help him to find that out. Check if the given permutation can be obtained from the permutation 1 2 ... *n* using exactly one segment reversal. If it is possible, find the segment itself.
The first line contains an integer *n* (1 ≤ *n* ≤ 1000) which is the number of coins in Vasya's collection. The second line contains space-separated *n* integers which are the spoilt sequence of coins. It is guaranteed that the given sequence is a permutation, i.e. it contains only integers from 1 to *n*, and every number is used exactly 1 time.
def o_word(t,type_word,length):
    for d in range(t+1,length):
        #print('d oda value :',d)
        if type_word[d]=='o':
            #print('d oda value inside if "o" :',d)
            return 'YES'            
def l2_word(z,type_word,length):
    for t in range(z+1,length):
        #print('t oda value :',t)
        if type_word[t]=='l':
            #print('t oda value inside if "l2" :',t)
            return o_word(t,type_word,length)
def l_word(y,type_word,length):
    for z in range(y+1,length):
        #print('z oda value :',z)
        if type_word[z]=='l':
            #print('z oda value inside if "l" :',z)
            return l2_word(z,type_word,length)
def e_word(x,type_word,length):
    for y in range(x+1,length):
        #print('y oda value :',y)
        if type_word[y]=='e':
            #print('y oda value inside if "e" :',y)
            return l_word(y,type_word,length)
def h_word(type_word,length):
    for x in range(length):
        #print('x oda value :',x)
        if type_word[x]=='h':
            #print('x oda value inside if "h" :',x)
            return e_word(x,type_word,length)

type_word=input()
length=len(type_word)
a=h_word(type_word,length)
if a=='YES':
    print(a)
else:
    print('NO')
