import sys 
S =  input()

string = ""
flag1 = 0
#フラグ管理かなぁ
lis1 = []
for i in range(len(S)):
    string = string + S[i]
    lis1.append(string)

    if string == "key":
        flag1 = 1
        break
     
string2 = "" 
lis2 = []
flag2 = 0
for i in range(len(S)-1,-1,-1):
    string2 = string2 + S[i]
    lis2.append(string2)
    
    if string2 == "ecne":
        flag2 = 1

if flag1 == 1 and flag2 == 1:
    print("YES")
    sys.exit()
elif flag1 == 0 and flag2 == 0:
    print("NO")
    sys.exit()

elif flag1 == 1 and flag2 == 0:
     for i in lis2:
         if "ecne" in i:
             print("YES")
             sys.exit()

elif flag1 == 0 and flag2 == 1:
     for i in lis1:
         if "key" in i:
             print("YES")
             sys.exit()

print("NO")