output_description: If S equals T after _rotation_ , print `Yes`; if it does not, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
      T
attempt: 英小文字からなる文字列S,Tが与えられます。Sを回転させてTに一致させられるか判定してください。
  すなわち、以下の操作を任意の回数繰り返してSをTに一致させられるか判定してください。
  操作:S=S1S2...S|S|のとき、SをS|S|S1S2...S|S|−1に変更する
  ここで、|X|は文字列Xの長さを表します。
  """
  
  s = input()
  t = input()
  # s,tをリストにする
  s = list(s)
  t = list(t)
  
  # 変数count,judgementに0を代入
  count = 0
  judgment = 0
  
  # sの長さだけ順番入れ替えを繰り返し
  while count <= len(s)+1:
      item = s.pop()
      s.insert(0,item)
      if s == t:
          # s==tになったらjudgmentでカウントアップ
          judgment += 1
      # 回数をカウントアップ
      count +=1
  
  # 一回もs==tになってなければNo
  if judgment == 0:
      print("No")
  else:
      print("Yes")
problem_description: Statement
  
  You are given string S and T consisting of lowercase English letters.
  
  Determine if S equals T after _rotation_.
  
  That is, determine if S equals T after the following operation is performed
  some number of times:
  
  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ...
  S_{|S|-1}.
  
  Here, |X| denotes the length of the string X.
samples: [{"input": "kyoto\n    tokyo", "output": "Yes\n    \n\n  * In the first operation, `kyoto` becomes `okyot`.\n  * In the second operation, `okyot` becomes `tokyo`.\n\n* * *"}, {"input": "abc\n    arc", "output": "No\n    \n\n`abc` does not equal `arc` after any number of operations.\n\n* * *"}, {"input": "aaaaaaaaaaaaaaab\n    aaaaaaaaaaaaaaab", "output": "Yes"}]