EasyRating 1000
Is It a Rotation?
Print YES if the second string is a rotation of the first (like waterbottle → erbottlewat), otherwise NO.
Input
Two lines.
Output
YES or NO.
Sample 1
Input
waterbottle erbottlewat
Output
YES
Sample 2
Input
abc acb
Output
NO
Output appears here