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: text = input()
  ptn = input()
  print(["No", "Yes"][(text * 2).find(ptn) != -1])
  
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"}]