A string is called a KEYENCE string when it can be changed to `keyence` by removing its contiguous substring (possibly empty) only once.  Given a string S consisting of lowercase English letters, determine if S is a KEYENCE string.
s = input()
for i in range(len(s)):
    for j in range(i, len(s)):
        if s[:i] + s[j:] == 'keyence':
            print('Yes')
            exit()
print('No')
s = input()
n = len(s)
for i in range(n):
    for j in range(i, n + 1):
        if s[:i] + s[j:] == 'keyence':
            print('YES')
            exit(0)
print('NO')