# KEYENCE String 全通りのパターンを探索する



# input process

S = eval(input())

s_length = len(S)



# initialization

is_same = False

for i in range(s_length):

    for j in range(i, s_length):

        # string slice

        tmp_str = S[:i+1] + S[j:]

        if tmp_str=="keyence":

            is_same = True

            break



if is_same:

    print("YES")

else:

    print("NO")

# Problem B - KEYENCE String



# input

s = eval(input())

s_l = len(s)



# initialization

is_ok = False



# check

for i in range(s_l):

    for j in range(i, s_l):

        tmp_s = s[:i] + s[j:]

        if tmp_s=='keyence':

            is_ok = True

            break



# output

if is_ok:

    print("YES")

else:

    print("NO")

# KEYENCE String 全通りのパターンを探索する
# input process
S = eval(input())
s_length = len(S)
# initialization
is_same = False
for i in range(s_length):
    for j in range(i, s_length):
        # string slice
        tmp_str = S[: i + 1] + S[j:]
        if tmp_str == "keyence":
            is_same = True
            break
if is_same:
    print("YES")
else:
    print("NO")

# Problem B - KEYENCE String
# input
s = eval(input())
s_l = len(s)
# initialization
is_ok = False
# check
for i in range(s_l):
    for j in range(i, s_l):
        tmp_s = s[:i] + s[j:]
        if tmp_s == "keyence":
            is_ok = True
            break
# output
if is_ok:
    print("YES")
else:
    print("NO")

-# KEYENCE String 全通りのパターンを探索する -# input process -S = eval(input()) -s_length = len(S) +# Problem B - KEYENCE String +# input +s = eval(input()) +s_l = len(s) -is_same = False -for i in range(s_length): -    for j in range(i, s_length): -        # string slice -        tmp_str = S[: i + 1] + S[j:] -        if tmp_str == "keyence": -            is_same = True +is_ok = False +# check +for i in range(s_l): +    for j in range(i, s_l): +        tmp_s = s[:i] + s[j:] +        if tmp_s == "keyence": +            is_ok = True -if is_same: +# output +if is_ok: