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,
- $k$ is a divisor of $n$;
- $s_1,s_2,\ldots,s_k$ are of equal length: $\frac{n}{k}$;
- There exists a string $t$, which is cyclical isomorphic with $s_i$ for all $1\le i\le k$.
Print ''Yes'' if the check is positive, or ''No'' otherwise.