Shengdebao had grown tired of the everyday life he had, so he decided to write down a set of letters around a circle. Mehrdad also had a string made up of lower case English letters. Shengdebao then decided to start from one letter on that circle and go around it in clockwise direction.
If at any point of time the string that Shengdebao makes by turning around the circle becomes equal to the one Mehrdad has, Mehrdad is obligated to give Shengdebao a prize! (or *"Shirini"* as they call it!)
Shengdebao wants to know whether he can or cannot receive a prize, and for that reason he has asked you to help him solve this problem.
In the first line of the input string is given that is actually the string written around the circle. In the second line string is given which is Mehrdad's string.
Both strings are made up of lower case English letters.
In the only line of output print "Yes" if Shengdebao can receive the prize and "No" if not.
Explanation: by starting from the 4th character the string can be made.