A string is called a KEYENCE string when it can be changed to `keyence` by removing its contiguous substring (possibly empty) only once.  Given a string S consisting of lowercase English letters, determine if S is a KEYENCE string.
s=input()
for i in range(len(s)):
    for j in range(i,len(s)):
        for k in range(j,len(s)):
            for l in range(k,len(s)):
                t=s[i:j]+s[k:l+1]
                print(t)
                if(t=='keyence'):
                    print('YES')
                    exit()
print('NO')            
 
s=input()
if(s[0:7]=='keyence'):
    print('YES')
    exit()
elif(s[-7:]=='keyence'):
    print('YES')
    exit()    
else:
    for i in range(7):
        t=s[0:i+1]+s[-6+i:]
        
        if(s[0:i+1]+s[-6+i:]=='keyence'):   
            print('YES')
            exit()
print('NO')       