output_description: If $p$ is in $s$, print Yes in a line, otherwise No.
input_description: In the first line, the text $s$ is given.  
  In the second line, the pattern $p$ is given.
attempt: n = str(input())
  a = len(n)
  N = list(n)
  m = str(input())
  A = len(m)
  x = 0
  for i in range(a):
      C = []
      for i in range(A):
          C.append(N[i])
      B = "".join(C)
      c = N[0]
      if B == m:
          x = x + 1
      N.remove(c)
      N.append(c)
  if x > 0:
      print("Yes")
  else:
      print("No")
  
problem_description: Ring
  
    
  
  Write a program which finds a pattern $p$ in a ring shaped text $s$.
  
    
  ![](https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE2_ITP1_8_D)
samples: [{"input": "vanceknowledgetoad\n    advance", "output": "Yes"}, {"input": "vanceknowledgetoad\n    advanced", "output": "No"}]