Problem:
 Score : 200 points    Problem 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 .      Constraints  2 \leq |S| \leq 100  |S| = |T|  S and T consist of lowercase English letters.         Input Input is given from Standard Input in the following format:  S  T       Output If S equals T after rotation , print Yes ; if it does not, print No .        Sample Input 1 kyoto
tokyo      Sample Output 1 Yes   In the first operation, kyoto becomes okyot .  In the second operation, okyot becomes tokyo .        Sample Input 2 abc
arc      Sample Output 2 No  abc does not equal arc after any number of operations.       Sample Input 3 aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab      Sample Output 3 Yes

Solution (Python):
a = raw_input()
b = raw_input()
print 'Yes' if any(a[i:] + a[:i] == b for i in xrange(len(a))) else 'No'

Solution (Python):
S = input()
T = input()
N = len(T)
for i in range(N):
    f = True
    for d in range(N):
        p = (i + d) % N

        if S[d] != T[p]:
            f = False
            break
    if f:
        print('Yes')
        exit()
print('No')

Solution (Python):
S = input()
T = input()

def Rotate(s):
    return s[-1] + s[:-1]

for _ in range(len(S)):
    if S == T:
        print('Yes')
        exit()
    S = Rotate(S)

print('No')

Solution (Python):
S = input()
T = input()
assert len(S) == len(T)

for _ in range(len(S)):
    if S == T:
        print("Yes")
        exit(0)
    else:
        S = S[-1] + S[:-1]
else:
    print("No")

Solution (Python):
S = input()
T = input()

S += S
if S.find(T) == -1:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
T = input()

for _ in range(len(S)):
    S = S[-1] + S[:-1]
    if S == T:
        print('Yes')
        exit()
print('No')

Solution (Python):
s=input()
t=input()
x=[s]
for i in range(len(s)-1):
    x.append(x[-1][-1]+x[-1][0:-1:])
print('Yes' if t in x else 'No')

Solution (Python):
s = input()
t = input()
L = len(s)

for i in range(L+1) :
    tmp = s[L-i:] + s[0:(L-i)]
    if tmp == t :
        print('Yes')
        exit()

print('No')

Solution (Python):
ss = input().strip()
ts = input().strip()

ss = ss + ss + ss

if ss.find(ts) != -1:
  print('Yes')
else:
  print('No')

Solution (Python):
a = input()
b = input()
l = len(a)
aa = []
for i in range(l):
    aa.append(a[-1] + a[:-1])
for i in range(l):
    b = b[-1] + b[:-1]
    for j in aa:
        if b==j:
            print('Yes')
            break
    else:
        continue
    break
else:
    print('No')

Solution (Python):
S = input()
T = input()

for k in range(101):
    S = S[-1]+S[:-1]
    if S == T:
        print("Yes")
        exit(0)
print("No")

Solution (Python):
def kit(x):
  return x[len(x)-1]+x[:len(x)-1]

a=input()
b=input()

for i in range(len(a)):
  a=kit(a)
  if a==b:
    print('Yes')
    exit()
else:
  print('No')

Solution (Python):
S=input()
T=input()
is_ans=0
for t in range(len(S)):
    aaa = S[t:len(S)] + S[:t]
    if aaa == T:
        is_ans=1
print("Yes" if is_ans else "No")

Solution (Python):
s = input()
t = input()
ans = "No"
for i in range(len(s)):
    s = s[1:len(s)] + s[0:1]
    if s == t:
        ans = "Yes"
print(ans)

Solution (Python):
S = input()
T = input()

flag = 0

for _ in range(len(S)+1):
    S = S[-1] + S[:-1]
    
    if S==T:
        flag = 1
        break
    
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
S=input()
T=input()
N=len(S)
if S==T:
    print('Yes')
    sys.exit()
for i in range(1,N):
    a=S[-i:]+S[:N-i]
    
    if a==T:
        print('Yes')
        sys.exit()
print('No')

Solution (Python):
S = input().strip()
T = input().strip()
ans = 'No'
for _ in range(len(S)):
  S = S[-1] + S[:-1]
  if S == T:
    ans = 'Yes'
    break
print(ans)

Solution (Python):
s = list(input())
t = list(input())

for i in range(len(s)):
    if s[0] == t[i]:
        temp = t[i:] + t[:i]
        if str(temp) == str(s):
            print("Yes")
            exit()

print("No")

Solution (Python):


s = input()
t = input()
n = len(s)

def rot(string):
    string = string[n-1] + string[:n-1]
    return string

for i in range(n):
    if s == t:
        print("Yes")
        break
    s = rot(s)
else:
    print("No")

Solution (Python):
s=input()
t=input()

count=0

if s==t:
  count=1

  
for i in range(len(s)):
  s = s[len(s)-1] + s[:len(s)-1]
  if s==t:
    count=1

    
if count==1:
  print("Yes")
else:
  print("No")

Solution (Python):
def solve(s, t):
    ss = {s[i:] + s[:i] for i in range(len(s))}
    return "Yes" if t in ss else "No"

if __name__ == "__main__":
    s = input()
    t = input()
    print(solve(s, t))

Solution (Python):
import sys
S = input()
T = input()
if S == T:
  print('Yes')
  sys.exit()
i = 0
while i < 100:
  x = S[-1]
  S = x+S
  S = S[:-1]
  if S==T:
    print('Yes')
    sys.exit()
  else:
    i += 1
print('No')

Solution (Python):
s = input()
t = input()
if t in s*2:
    print("Yes")
else:
    print("No")

Solution (Python):
s=str(input())
t=str(input())
flag=0
if(s==t):
    flag=1
    print('Yes')
else:
    a=s
    for i in range(len(s)-1,-1,-1):
        a=s[i]+a
        a=a[:-1]
        if(a==t):
            flag=1
            break
    if(flag==1):
        print('Yes')
    else:
        print('No')

Solution (Python):
s = list(input())
t = list(input())
ans = "No"
for i in range(0,len(s)):
    a = s.pop(0)
    s.append(a)
    if s == t:
        ans = "Yes"
        break
print(ans)

Solution (Python):
S = input()
T = input()
S = S + S
if T in S:
    print("Yes")
else:
    print("No")

Solution (Python):
S, T = input(), input()
def f():
    for i in range(len(S)):
        if T == S[i:] + S[:i]:
            print("Yes")
            return
    print("No")
f()

Solution (Python):
S = input()
T = input()
e = 0
for i in range(len(S)):
  a = S[-1]
  S = S[:-1]
  S = a+S
  if T == S:
    e = 1
    break
if e==0:
  print("No")
else:
  print("Yes")

Solution (Python):
s = input()
t = input()

flag = True
for _ in range(len(t)):
  if s == t:
    print('Yes')
    flag = False
    break
  s = s[-1] + s[:-1]

if flag:
  print('No')

Solution (Python):
if __name__ == '__main__':
    s = input()
    t = input()

    if s == t:
        print('Yes')
        exit(0)

    for _ in range(len(s)):
        s = s[1:] + s[0]
        if s == t:
            print('Yes')
            exit(0)
    
    print('No')

Solution (Python):
S = input()
T = input()

for i in range(len(S)):
    Si = S[i:] + S[:i]
    if Si == T:
        print('Yes')
        exit()
print('No')

Solution (Python):
s=input()
t=input()

l=len(s)
ans='No'
for i in range(l):
	if s==t:
		ans='Yes'
	else:
		s=s[l-1]+s[:l-1]
print(ans)

Solution (Python):
S = input()
T = input()
ans = 'No'
M = len(S)
if len(S) != len(T):
    pass
else:
    for i in range(M):
        SK = ''
        for j in range(M):
            SK += S[(j+i)%M]
        if T == SK:
            ans = 'Yes'
            break
print(ans)

Solution (Python):




S=input()
T=input()

kaitensu=len(S)

for i in range(kaitensu):
    S=S[kaitensu-1]+S[0:kaitensu-1]
    if S==T:
        print("Yes")
        exit()
print("No")

Solution (Python):
S = input()
T = input()

ans = 'No'
for i in range(len(S)):
    S2 = S[i:] + S[:i]
    if S2 == T:
        ans = 'Yes'
        break
print(ans)

Solution (Python):
s = input()
t = input()
ans = "No"
for i in range(len(s)+1):
    if s == t:
        ans = "Yes"
        break
    s = s[1:] + s[0]


print(ans)

Solution (Python):
S = input()
T = input()

lenS = len(S)
Ans = "No"
for i in range(lenS):
    if S==T:
        Ans = "Yes"
        break
    else:
        S = S[lenS-1:]+S[:lenS-1]

print(Ans)

Solution (Python):
import sys
S = sys.stdin.readline().strip()
T = sys.stdin.readline().strip()
flag = False
for i in range(len(S)):
    if S == T[i:] + T[:i]:
        flag = True
        break
print('Yes' if flag else 'No')

Solution (Python):
s = input()
t = input()
for _ in range(len(s)):
  if s == t:
    print("Yes")
    break

  s = s[-1] + s[0:-1]

else:
  print("No")

Solution (Python):
S = input()
T = input()
for i in range(len(S)):
    if S[i:] + S[:i] == T:
        print('Yes')
        exit()
print('No')

Solution (Python):
S = input()
T = input()

for i in range(len(S)):
    if T == S[i:] + S[:i]:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
s1=input()
s2=input()
f = False
for i in range(len(s1)):
  if s1==s2:
    f = True
    break
  else:
    s1=s1[-1]+s1[:-1]
if f:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
s = raw_input()

t = raw_input()


l = len(s)
for i in range(l):

	if s[i:] + s[:i] == t:
		print 'Yes'
		sys.exit()

print 'No'

Solution (Python):
s = input()
t = input()

c = 0
for i in range(len(s)):
  if s[i:] + s[:i] ==t:
    print("Yes")
    c = 1
    break
if c==0:
  print("No")

Solution (Python):
S=input()
T=input()
for i in range(len(S)):
    if S[i:]+S[:i]==T:
        print('Yes')
        break
else:
    print('No')

Solution (Python):
s = input()
t = input()

print('Yes' if any(s == t[i:] + t[:i] for i in range(len(t))) else 'No')

Solution (Python):
s = input()
t = input()

flag = False
for i in range(len(s)+1):
    s = s[-1]+s[:-1]
    if s == t:
        flag = True
        break
print("Yes" if flag else "No")

Solution (Python):
s = input()
t = input()

for i in range(len(s)):
    s = s[-1] + s[:-1]
    if s == t:
        print("Yes")
        exit()
print("No")

Solution (Python):
import re


s = input()
t = input()

ss = s + s
if re.search(t, ss):
    print('Yes')

else:
    print('No')

Solution (Python):
S = input()
T = input()

for i in range(len(S)):
    if S[i:] + S[:i] == T:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
s = input()
t = input()
for i in range(len(s)):
    if t == (s[i:] + s[:i]):
        print('Yes')
        exit()

print('No')

Solution (Python):
S = input()
T = input()

for i in range(len(S)):
    tmp = S[i:] + S[:i]
    if tmp == T:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
def i1():
 return int(input())
def i2():
 return [int(i) for i in input().split()]
a=input()
b=input()
a=a+a
if b in a:
 print("Yes")
else:
 print("No")

Solution (Python):
S=input()
T=input()
N = len(S)

isok = False
for i in range(N):
    if S==T:
        isok=True
        break
    S = S[1:]+S[0]
    
if isok: print("Yes")
else: print("No")

Solution (Python):
import sys

S = sys.stdin.readline().rstrip()
T = sys.stdin.readline().rstrip()

for i in range(len(S)):
    tmp = S[i:] + S[0:i]
    if tmp == T:
        print('Yes')
        exit()
print('No')

Solution (Python):
S = input()
T = input()
l = len(S)

for i in range(l):
  if S[l-i:] + S[:l-i] == T:
    print('Yes')
    exit()
print('No')

Solution (Python):
S = input()
T = input()

ans = S == T
for i in range(len(S)):
    S = S[-1] + S[:-1]
    if S == T:
        ans = True

if ans:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
t = input()
ans = "No"
for i in range(len(s)):
	if t==s[i:]+s[:i]:
		ans = "Yes"
		break
print(ans)

Solution (Python):
S = input()
T = input()

def solve(S, T):
    for i in range(len(S)):
        if S[i:] + S[:i] == T:
            return True
    return False

if solve(S, T):
    print("Yes")
else:
    print("No")

Solution (Python):
s = raw_input()
t = raw_input()
print ["No", "Yes"][ any( t[i:]+t[:i]==s for i in range(len(t)) ) ]

Solution (Python):
S = input()
T = input()
ans = 'No'
for i in range(len(S)):
  if S == T:
    ans = 'Yes'
  S = S[-1] + S[:-1]
print(ans)

Solution (Python):
S=input()
T=input()

res=False
for i in range(len(S)):
    tmp = S[-1]
    S=tmp+S[0:-1]
    if S==T:
        res=True
if res:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
t = input()

for i in range(len(s)):
    if s == t:
        print("Yes")
        exit()
    s = s[1:] + s[0]
    

print("No")

Solution (Python):
s = input()
t = input()
for i in range(len(s)):
  if s[i:]+s[:i]==t:
    print("Yes")
    exit()
print("No")

Solution (Python):
S=input()
T=input()
N=len(S)
flag=False
for i in range(N):
    U=T[i:]+T[:i]
    if U==S:
        flag=True
        break
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
t = input()
if s == t:
    print("Yes")
    quit()
d = s[len(s)-1]+s[:len(s)-1]
while d != s:
    if d == t:
        print("Yes")
        quit()
    d = d[len(s)-1]+d[:len(s)-1]
print("No")

Solution (Python):
from sys import exit, setrecursionlimit, stderr
from functools import reduce
from itertools import *
from collections import defaultdict
from bisect import bisect

def read():
  return int(input())

def reads():
  return [int(x) for x in input().split()]

S = input()
T = input()

print('Yes' if any(T[i:] + T[:i] == S for i in range(len(S))) else 'No')

Solution (Python):
s = input()
t = input()

ans = 'No'

for i in range(len(s)):
    if s == t:
        ans = 'Yes'

    s = s[-1] + s[:-1]

print(ans)

Solution (Python):
s = list(input())
t = list(input())

yes = False

for i in range(len(s)):
	if s[i:] + s[:i] == t:
		yes = True

if yes:
	print("Yes")
else:
	print("No")

Solution (Python):
s = list(input())
t = list(input())
res = False
for i in range(len(s)):
    if t == s[i:] + s[:i]:
        res = True

if res:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
t = input()

s += s


if t in s:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
T = input()

Ss = [S[n:] + S[:n] for n in range(len(S))]

print('Yes' if T in Ss else 'No')

Solution (Python):
S = input()
T = input()
for i in range(len(S)):
    if S == T:
        print("Yes")
        exit()
    S = S[-1] + S[0:-1]
    
print("No")

Solution (Python):
S = raw_input()
T = raw_input()
ans = "No"
for i in range(len(S)):
  if S[i:]+S[:i]==T:
    ans = "Yes"
print ans

Solution (Python):


s = input()
t = input()
for i in range(len(s)):
    s = s[-1] + s[:-1]
    if s == t:
        print('Yes')
        exit()
print('No')

Solution (Python):
a = raw_input()
b = raw_input()
n = len(a)
f = 0
for i in xrange(n):
    if a==b:
        f = 1
    a = a[-1:] + a[:-1]
if f==1:
    print 'Yes'
else:
    print 'No'

Solution (Python):
import sys

s=input()
t=input()

for i in range(len(s)):
    if s[len(s)-1-i:]+s[:len(s)-1-i]==t:
        print('Yes')
        sys.exit()
print('No')

Solution (Python):
S = input()
T = input()

S += S
if S.find(T) == -1:
    print('No')
else:
    print('Yes')

Solution (Python):
S = raw_input()
T = raw_input()
N = len(S)

for i in xrange(N + 1):
    if S == T:
        print "Yes"
        exit()
    S = S[1:N] + S[0]
print "No"

Solution (Python):
s = input()
t = input()
for _ in range(len(s)):
    if s == t:
        print('Yes')
        break
    s = s[-1] + s[:-1]
else:
    print('No')

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

S = input()
T = input()

for i in range(len(S)):
    S2 = S[i:] + S[:i]
    if S2 == T:
        print("Yes")
        sys.exit(0)
print("No")

Solution (Python):
s = raw_input()
t = raw_input()
print "Yes" if s in t+t else "No"