"""
B - KEYENCE String
"""
#入力処理
def simple_input():
    temp_input = input().rstrip().split(' ')
    if len(temp_input) > 1:
        return temp_input
    return temp_input[0]

#メイン処理
if __name__ == '__main__':
    #入力
    s = input()
    keyence = "keyence"

    result = "NO"
    
    matchcount = 0
    for i in range(7):
        si = s[i]
        ki = keyence[i]
        if(si == ki):
            matchcount = matchcount + 1
        else:
            break

    for i in range(7):
        i2 = i * -1 - 1
        si = s[i2]
        ki = keyence[i2]
        if(si == ki):
            matchcount = matchcount + 1
        else:
            break

    if(matchcount >= 7):
        result = "YES"
    
    print(matchcount)

    #出力
    print(result)
