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: # Author: cr4zjh0bp
  # Created: Wed Mar 11 16:31:16 UTC 2020
  import sys
  
  stdin = sys.stdin
  inf = 1 << 60
  mod = 1000000007
  
  ni = lambda: int(ns())
  nin = lambda y: [ni() for _ in range(y)]
  na = lambda: list(map(int, stdin.readline().split()))
  nan = lambda y: [na() for _ in range(y)]
  nf = lambda: float(ns())
  nfn = lambda y: [nf() for _ in range(y)]
  nfa = lambda: list(map(float, stdin.readline().split()))
  nfan = lambda y: [nfa() for _ in range(y)]
  ns = lambda: stdin.readline().rstrip()
  nsn = lambda y: [ns() for _ in range(y)]
  ncl = lambda y: [list(ns()) for _ in range(y)]
  nas = lambda: stdin.readline().split()
  
  S = ns()
  T = ns()
  N = len(S)
  flag = False
  
  for i in range(N + 1):
      q = S[:i]
      p = S[i:]
      if p + q == T:
          flag = True
  
  print("Yes" if flag else "No")
  
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"}]