#include<stdio.h>
int main()
{
    char str[10], search[12];
    int count1=0, count2=0, i, j, flag;


    //printf("Enter a string: ");
    gets(search);

    //printf("Enter search substring: ");
    gets(str);


    while(str[count1]!= '\0')
    {
        count1++;

        while(search[count2]!= '\0')

            count2++;


        for(i=0; i<=count1-count2; i++)
        {
            for(j=i; j<i+count2; j++)
            {
                flag=1;

                if(str[j] != search[j-i])
                {
                    flag = 0;
                    break;
                }

            }

            if(flag == 1)
            {
                break;
            }

        }

    }

    if(flag == 1)
    {
        printf("Yes");
    }


    else
    {
        printf("No");
    }



    return 0;
}
