Jaya the dispatch writer watches over the indigo vats of Bluehollow's stores of ribbons. A careful computation stands between order and chaos. Task: Print YES if s is a rotation of t, otherwise NO. Input format: Two lines: string s, then string t. Output format: Print YES or NO. Constraints: 1 <= |s|,|t| <= 1839; lowercase letters.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= |s|,|t| <= 1839; lowercase letters.
