# 1
# https://atcoder.jp/contests/keyence2019/tasks/keyence2019_a
if False:
    print('YES' if set(input().split())==set(list('1974')) else 'NO')

# 2
# https://atcoder.jp/contests/keyence2019/tasks/keyence2019_b
if True:
    S=input()
    ans='NO'
    K='keyence'
    for i in range(len(K)):
        l=K[:i]
        r=K[i:]
        if l in S and r in S:
            l_i=S.index(l)
            r_i=len(S)-1-S[::-1].index(r[::-1])
            if l_i<r_i:
                ans='YES'
                break
    print(ans)