#c22403. 循环同构判断
循环同构判断
Cyclic Isomorphism Check
Problem Description
You are given two strings and , consisting only of lowercase letters. Determine whether the two strings are cyclically isomorphic.
If yes, output Yes; otherwise output No.
Input Format
The first line contains a string .
The second line contains a string .
Output Format
Output one line with a string, the answer.
Sample Input 1
baabaac
cbaabaa
Sample Output 1
Yes
Sample Input 2
aaab
caaa
Sample Output 2
No
Constraints
For all data: , and both strings consist only of lowercase letters.