using System;
class Program
{
static bool rotations(String str1, String str2) {
if (str1.Length != str2.Length)
return false;
Console.WriteLine(str1 + str1);
return (str1 + str1).IndexOf(str2) != -1;
}
static void Main() {
String str1 = "abcxd", str2 = "cxdab";
if (rotations(str1, str2))
Console.Write("yes");
else
Console.Write("no");
}
}
/*
run:
abcxdabcxd
yes
*/