# B - KEYENCE String
S = input()
K = list('keyence#')
count = 0
idx_k = 0
is_NG = False

for s in S:
    if K[idx_k]==s:
        if idx_k<7:
            idx_k += 1
        is_NG = False
    else:
        if not is_NG:
            count +=1
            is_NG = True
    
    if count>=2:
        break
  
if count<=1 and idx_k>=6:
    print('YES')
else:
    print('NO')
