# 分割のパターンを洗い出す方法
k_str = 'keyence'
patterns = [[k_str[:i], k_str[i:]] for i in range(len(k_str))]
for pattern in patterns:
    if pattern[0] in S:
        next_starting_idx = S.index(pattern[0]) + len(pattern[0]) 
        if pattern[1] in S[next_starting_idx:]:
            print('YES')
            break
    
else:
    print('NO')
