Problem E: CCC'20 J4- CyclicShifts

Problem E: CCC'20 J4- CyclicShifts

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 14  Solved: 4
[Submit] [Status] [Web Board] [Creator:]

Description

Thuc likes finding cyclic shifts of strings. A cyclic shift of a string is obtained by moving characters from the beginning of the string to the end of the string. 
We also consider a string to be a cyclic shift of it self. For example,the cyclic shifts of ABCDE are:
ABCDE, BCDEA, CDEAB, DEABC,and EABCD.
Given some text, T,and a string, S,determine if T contains a cyclic shift of S.


Input

The input will consist of exactly two lines containing only uppercase letters. 
The first line will be the text T,and the second line will be the string S. 
Each line will contain at most 1000 characters.
 For 6 of the 15 available marks, S will be exactly 3 characters in length.

Output

Output yes if the text, T,contains a cyclic shift of the string, S. Otherwise,output no.

Sample Input Copy

ABCCDEABAA
ABCDE

Sample Output Copy

yes

HINT