#include <iostream>
bool rotation(std::string str1, std::string str2) {
if (str1.length() != str2.length())
return false;
std::cout << str1 + str1 << "\n";
return ((str1 + str1).find(str2) != std::string::npos);
}
int main()
{
std::string str1 = "abcxd", str2 = "cxdab";
if (rotation(str1, str2))
std::cout << "yes" << "\n";
else
std::cout << "no" << "\n";
return 0;
}
/*
run:
abcxdabcxd
yes
*/