s=input()

ans='keyence'
index=0
isCut=0
isKeyence=0
for i in range(len(s)):
    canRestart=0
    restart=0
    if isCut==1:
        if s[i]!=ans[index]:
            isKeyence=0
            if canRestart:
                canRestart=0
                i=restart
                index=restart+1
            else:
                break
    elif isCut==-1:
        if s[i]==ans[index]:
            restart=index
            canRestart=1
            isCut=1
    else:
        if s[i]==ans[index]:
            isKeyence=1
        else:
            isCut=-1
    index+=1
    if index>6:
        break

if isKeyence:
    print('YES')
else:
    print('NO')
