

Isomorphic StringsTime Limit: 8000/8000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 2616 Accepted Submission(s): 726 Problem Description It is preferrable to read the pdf statment. Two strings are called cyclical isomorphic if one can rotate one string to get another one. 'Rotate' here means ''to take some consecutive chars (maybe none) from the beginning of a string and put them back at the end of the string in the same order''. For example, string ''abcde'' can be rotated to string ''deabc''. Now that you know what cyclical isomorphic is, Cuber QQ wants to give you a little test. Here is a string $s$ of length $n$. Please check if $s$ is a concatenation of $k$ strings, $s_1,s_2,\cdots,s_k$ ($k>1$), where,
Print ''Yes'' if the check is positive, or ''No'' otherwise. Input The first line contains an integer $T$ ($1\le T\le 1000$), denoting the number of test cases. $T$ cases follow.
It is guaranteed that the sum of $n$ does not exceed $2\cdot 10^7$. Output For each test case, output one line containing ''Yes'' or ''No'' (without quotes). Sample Input
Sample Output
Source  
