program sample
    implicit none
  
    integer(8) :: i,j,m,n
    real(8)::a,b
    integer(8),allocatable :: x(:),y(:)
    character(len=100)::c !文字列

    read(*,*) c
    j=0
    n=len_trim(c)  !len_trimは空白を無視する、大きめに取って
    if (n==7)then
        if (c=='keyence')then
            write(*,*)'Yes'
        else
            write(*,*)'No'
        end if

        stop
    end if

    if (c(1:7)=='keyence')then
        write(*,*)'Yes'
        stop
    end if
    if (c(n-7:n)=='keyence')then
        write(*,*)'Yes'
        stop
    end if
    

    do i=1,6
    
        if (c(1:i)//c(n+i-6:n)=='keyence')then
            write(*,*)'Yes'
            stop
        
        end if

    end do
    write(*,*)'No'
  
    stop
end program sample
  

