program ABC103B
    implicit none
    integer(8)::i
    integer(8)::flg=0
    character(100)::S,T

    read(5,*)S
    read(5,*)T

    do i=1,len_trim(S)
        if(S(i:len_trim(S))//S(1:i-1)==T)then
            flg=1
            exit
        end if
    end do

    if(flg==0)then
        print'(A)',"No"
    else
        print'(A)',"Yes"
    end if
    
end program ABC103B