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):
S = input().strip()
T = input().strip()

is_ok = False
for i in range(0,len(S)):
    if S == T:
        is_ok = True
        break
    S = S[-1] + S[:-1]

print("Yes" if is_ok else "No")

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

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

Solution (Python):
s=input()
t=input()
result=""
flag=False

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

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

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

Solution (Python):
s=input()
t=input()
c=True
for x in range(len(s)):
    temp=s[(len(s)-x):]+s[:(len(s)-x)]
    if(temp==t):
        print("Yes")
        c=False
        break
if(c):
    print("No")

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

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

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

print('Yes' if s in t else 'No')

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

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

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

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

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

for i in range(len(S)):
    if(S==T):
        print("Yes")
        quit()
    a=S[0]
    S.pop(0)
    S.append(a)

print("No")

Solution (Python):
S = str(input())
T = str(input()) 
S_rot = S+"A"
for i in range(len(S)):
    if i == 0:
        S_rot = S_rot.replace("A",S_rot[0])
        S_rot = S_rot[1:]
    else:
        S_rot = S_rot+"A"
        S_rot = S_rot.replace("A",S_rot[0])
        S_rot = S_rot[1:]

    if S_rot == T:
        print("Yes")
        exit()
    else:
        continue
print("No")

Solution (Python):

S, T = input(), input()

ans = "No"
for _ in S:
    if T == S:
        ans = "Yes"
    T = T[-1] + T[:-1]
print(ans)

Solution (Python):
s = list(input())
t = list(input())
for _ in range(len(s)):
    s.insert(0,s.pop())
    if s == t:
        print('Yes')
        exit()
else: print('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 = input()
T = input()
count = 0
while count < len(S):
    S = S[len(S)-1] + S[:len(S)-1]
    count += 1
    if S == T:
        print('Yes')
        exit()
print('No')

Solution (Python):
import numpy as np
def piyo():
    s = np.array(list(input()),dtype=str)
    a = np.array(list(input()),dtype=str)
    for _ in s:
        s = np.roll(s, 1)
        if (s==a).all():
            print("Yes")
            return
    print("No")
        
if __name__ == '__main__':
    piyo()

Solution (Python):



def main():
    """Function."""
    s = str(input())
    t = str(input())

    flag = 0
    for _ in range(len(s)):
        temp = s[-1] + s[:-1]
        if temp == t:
            flag = 1
            break
        s = temp

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


if __name__ == "__main__":
    main()

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

Solution (Python):

S = input()
T = input()
S +=S
T +=T
for i in range(0,len(S)//2):
    flag = True
    for k in range(0,len(S)//2):
        if T[k+i] != S[k]:
            flag = False
    if flag == True:
        print("Yes")
        exit()
print("No")

Solution (Python):
S = list(input())
T = list(input())
count=0
for i in range(len(S)):
    if(S==T):
        print("Yes")
        count=1
        break
    else:
        a = S[0]
        S.append(a)
        S = S[1:]

if(count!=1):
    print("No")

Solution (Python):
def main():
    s = input()
    t = input()
    ss = s + s
    n = len(s)
    for i in range(0, n):
        if t == ss[i:(i + n)]:
            print('Yes')
            return
    print('No')


if __name__ == '__main__':
    main()

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

Solution (Python):
s = list(input())
t = list(input())
ans = 0
for i in range(len(s)):
    if s == t:
        ans = 1
        break
    a = s[0]

    for j in range(len(s)-1):
        s[j] = s[j+1]

    s[-1] = a

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

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

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

Solution (Python):
s = input()
t = input()
p = s * 2
ctr = 0
for i in range(len(p) - len(t)):
    if p[i:i+len(t)] == t:
        print('Yes')
        ctr = 1
        break
if ctr == 0:
    print('No')

Solution (Python):
a = input()
b = input()
c = a + a
count = 0
for i in range(len(c) - len(b)):
  if c[i:i+len(b)] == b:
    print("Yes")
    count += 1
    break
if count == 0:
  print("No")

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

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

print('No')

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

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

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

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

Solution (Python):
import sys




S = str(input())
T = str(input())
S3 = S*3
if T in S3:
    print("Yes")
else:
    print("No")

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

    for _ in range(len(s)):
        if s == t:
            print("Yes")
            return 0
        else:
            s = s[-1] + s[:-1]
    print("No")


abc103_b()

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):
import sys

str1 = input()
str2 = input()

for i in range(len(str1)):
  if (str1 == str2):
    print('Yes')
    sys.exit()
  else:
    str1 = str1[1:] + str1[0]
    
print('No')

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

ls = len(s)
flag = False

for i in range(ls):
  s = s[-1:] + s[0:-1]
  
  if s == t:
    flag = True
    break

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

Solution (Python):
def main():
    s = list(input())
    t = list(input())
    s_len = len(s)
    for i in range(s_len):
        if s == t:
            print("Yes")
            return
        tmp = s[0]
        s.pop(0)
        s.append(tmp)
    print("No")


main()

Solution (Python):
from collections import deque

a=deque(input())
b=list(input())

n=len(a)


flag=0
for i in range(n):
  list1=list(a)
  if list1==b:
    flag=1
  a.rotate(1)
  
print('Yes' if flag==1 else 'No')

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

Solution (Python):
s = [i for i in input()]
t = [i for i in input()]
flg = 0

for i in range(len(s)):
    if s != t:
        s.append(s[0])
        s.remove(s[0])
    else:
        flg = 1
        break

if flg == 0:
    print("No")
else:
    print("Yes")

Solution (Python):
a=list(input())
b=list(input())
hantei=True
for i in range(len(a)):
	c=[]
	c.append(a[-1])
	for i in range(0,len(a)-1):
		c.append(a[i])
	a=c
	if c==b:
		hantei=True
		break
	else:
		hantei=False

if hantei==False:
	print("No")
else:
	print("Yes")

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

is_okay = False
for i in range(len(T)) :
	if (S == T) :
		is_okay = True
		break
	
	T = T[1:] + T[0]

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

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

list = list(s)
for i in range(len(list)):
  list.append(list[i])
  
list = "".join(list)
  
if S in list:
  print("Yes")
  
else:
  print("No")

Solution (Python):

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

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

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

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

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

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

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

Solution (Python):
S = list(str(input()))
T = str(input())
s = len(S)
ss = " "
for x in S:
  ss+=x
flag = 0
for i in range(s):
  if ss == T:
    print("Yes")
    flag = 1
    break
  else:
    j = s-1
    while j > 0:
      S[j] , S[j-1] = S[j-1] , S[j]
      j-=1
    st =""
    for y in S:
      st+=y
    if st == T:
      print("Yes")
      flag = 1
      break
if flag == 0:
  print("No")

Solution (Python):
def check(S, T):
    for _ in range(len(S)):
        if S == T:
            return True
        S = S[-1] + S[:-1]
    return False


def main():
    S = input()
    T = input()
    if check(S, T):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Solution (Python):
S = input()
S_length = len(S)
S_list = list(S)
T = input()
compare_S = ''

for _ in range(S_length):
    for i in range(S_length):
        compare_S+=S_list[i]
    if compare_S == T:
        print('Yes')
        exit()
    compare_S = ''
    pop_S_list = S_list.pop()
    S_list.insert(0, pop_S_list)
print('No')

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

ans = False
for i in range(len(S)):
    R = S[i:] + S[:i]
    if T == R:
        ans = True
        break

print("Yes" if ans else "No")

Solution (Python):
s=input();t=input()
flg=1
n=len(s)
for i in range(n):
    tmp = s[-i:]+s[:-i]
    if tmp == t:
        flg = 0
print("YNeos"[flg::2])

Solution (Python):
a=input()
b=input()
A=a*2
if b in A:
  print("Yes")
else:
  print("No")

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

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

print(ans)

Solution (Python):
L = list(input())
T = input()
flag = 0
for i in range(len(L)) :
    L.append(L[0])
    L.pop(0)

    if T == "".join(L) :
        flag = 1
        break
if flag == 1 :
    print("Yes")
else :
    print("No")

Solution (Python):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10**5)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

s = ns()
t = ns()
ss = s+s

print('Yes') if t in ss 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()
n = len(s)
for i in range(n):
    k = s[n-i-1:]+s[:n-i-1]
    if k == t:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
import sys
S = list(input())
T = list(input())

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

Solution (Python):
s = list(input())
t = list(input())
ans = 0
if s == t:
    ans += 1
for i in range(len(s)):
    s.insert(0, s[-1])
    s.pop()
    if s == t:
        ans += 1
        break
if ans == 0:
    print("No")
else:
    print("Yes")

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

Solution (Python):
S = input()
T = input()
if (S + S).find(T) == -1:
    print("No")
else:
    print("Yes")

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

can_match = False
for i in range(len(S)):
    rotated_s = S[i:] + S[:i]
    if rotated_s == T:
        can_match = True
        break

print("Yes" if can_match else "No")

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

    for _ in range(len(s)):
        if s == t:
            print('Yes')
            break
        s = rotate(s)
    else:
        print('No')


def rotate(string):
    return string[1:] + string[0]


def model():
    s = input()
    t = input()
    
    if s in t * 2:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    
    model()

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

    for _ in range(len(s)):
        if s == t:
            print('Yes')
            break
        s = rotate(s)
    else:
        print('No')


def rotate(string):
    return string[1:] + string[0]


if __name__ == '__main__':
    solve()

Solution (Python):
S = str(input())
T = str(input())
k = 0
for i in range(len(S)):
  last = S[-1]
  S = S[:-1]
  S = last + S
  if S == T:
    print('Yes')
    break
  else:
    k = k + 1

if k == len(S):
  print('No')

Solution (Python):
s = input()
t = input()
u = s + s
d = u.find(t)
if d == -1:
    print('No')
else:
    print('Yes')

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

print("No")

Solution (Python):

def count_substr(s1, s2):
    s2_length = len(s2)
    for i in range(s2_length):
        substr = s2[0:(s2_length - i)]
        if s1.endswith(substr):
            return (len(substr))
    return 0


s = input()
t = input()


match_count = count_substr(s, t)

is_match = False

if match_count > 0:
    
    slice  = len(s) - match_count
    s = s[slice:] + s[0:slice]
    is_match = (s == t)


print("Yes" if is_match else "No")

Solution (Python):
s = input()
t = input()
u = list(s)
v = list(t)
com1 = []
com1.append(u[0])

p = 0

for i in range(len(u)):
    for j in range(len(u)):
        if j == len(u) - 1:
            u[0] = com1[j]
        else:
            com1.append(u[j + 1])
            u[j + 1] = com1[j]

    if u == v:
        print("Yes")
        p = 1
        break
    com1 = []
    com1.append(u[0])

if p == 0:
    print("No")

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

if s == t:
    print('Yes')
else:
    sCopy = s.copy()
    while sCopy != t:
        sCopy.insert(0, sCopy[-1])
        sCopy.pop(-1)
        if sCopy == t:
            res = 'Yes'
            break
        if sCopy == s:
            res = 'No'
            break
    print(res)

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

def main():
    s = S
    length = len(s)
    ans = "No"
    for _ in range(length):
        if s == T:
            ans = "Yes"
            break
        temp = s[-1] + s
        s = temp[0:length]
    print(ans)

if __name__ == "__main__":
    main()

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

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

for i in range(len(s)):
  s = s[-1]+s[0:len(s)-1]
  if s == t:
    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')
    exit()
print('No')

Solution (Python):
from sys import stdin


def main() -> None:
    s = next_str()
    t = next_str()
    print(("No", "Yes")[s in t * 2])


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
T = input()
num = len(S)
C = ''
count = 0
if S == T:
    count += 1
    print('Yes')
else:
    for n in range(num):
        S = str(S[-1] + S[:num-1])
        if T == S:
            count += 1
            print('Yes')
            break

if count == 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):
a = raw_input()
b = raw_input()

l = len(a)
if a == b:
    print "Yes"
else:
    state = 0
    for i in range(l-1):
        a = a[-1]+a[0:-1]
        if a == b:
            print "Yes"
            state = 1
            break
    if state == 0:
        print "No"

Solution (Python):
A = list(input())
B = list(input())
length = len(A)
for i in range(length):
 if  A == B:
  print('Yes')
  break
 A = list(A[-1])+A[:-1]
else:
  print('No')

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

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

print('No')

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

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

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

Solution (Python):
S = list(str(input()))
T = list(str(input()))
for let in S:
    last = S.pop(-1)
    S.insert(0,last)
    if S==T:
        print("Yes")
        exit()
    else:
        pass
print("No")

Solution (Python):
def rotation(s, t):
    l = len(s)
    j = 0
    while True:
        jj = True
        for i in range(len(s)):
            if s[(i + j) % l] != t[i]:
                jj = False
                break
        if jj:
            return 'Yes'
        j += 1
        if j == l:
            break
    return 'No'

s = input()
t = input()

print(rotation(s, t))

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

Solution (Python):

str_a = input()
str_b = input()

for i in range(len(str_a)):
    if str_a == str_b:
        print('Yes')
        exit()
    b = str_a[-1]
    c = str_a[:-1]
    str_a = b + c

print('No')

Solution (Python):
import sys
s = list(input())
t = list(input())
n = len(s)
r = ['']*n

for i in range(n):
    r[0] = s[n - 1]
    for j in range(1, n):
        r[j] = s[j - 1]
    s = r
    r = ['']*n
    if s == t:
        print('Yes')
        sys.exit()

print('No')

Solution (Python):
import sys
s1=input ()
s2=input ()
for _ in range(len (s1)):
  if s1==s2:
    print ('Yes ')
    sys.exit ()
  s1=s1[-1]+s1[:-1]
print ('No ')

Solution (Python):


s=list(input())
t=list(input())

n=len(s)
same=False
for i in range(0,n):
  if s==t:
    same=True
    break
  t=t[1:]+t[:1]
  

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

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

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

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

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

Solution (Python):
S = list(input())
T = list(input())
for i in range(len(S)):
    if S == T:
        print('Yes')
        break
    S.insert(0, S[-1])
    del S[-1]
else:
    print('No')

Solution (Python):
s = input()
t = input()
S = len(list(s))
ans = 'No'

for i in range(S+1):
    if s == t:
        ans = 'Yes'
        break
    else:
        d = s[:S-1]
        e = s[-1]
        s = e+d

print(ans)

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

print(ans)

Solution (Python):

s = list(input())
t = list(input())
s_ = s
for i in s:
    if s_ != t:
        s_ += s[0]
        del s_[0]
    else:
        print('Yes')
        exit()
print('No')

Solution (Python):
S = [s for s in input()]
T = [t for t in input()]

for _ in range(len(S)):
  a = S.pop(-1)
  S.insert(0, a)

  if S == T:
    break
    
if S == T:
  print("Yes")
else:
  print("No")

Solution (Python):
S = list(input())
T = list(input())
for _ in T:
    if S == T:
        print("Yes")
        exit(0)
    c = T.pop(0)
    T.append(c)
print("No")

Solution (Python):
s = list(input())
t = list(input())
ans = 'No'
if s == t:
    ans = 'Yes'

cnt = 0
while s != t:
    cnt += 1
    s = [s[-1]] + s[:-1]
    if s == t:
        ans = 'Yes'
    
    if cnt > len(s):
        break

print(ans)

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

flag = 0

for i in range(len(s)):
    flag = 0
    for j in range(len(s)):
        if s[j] != t[(j + i) % len(s)]:
            flag = 1

    if flag == 0:
        print("Yes")
        exit(0)
        

print("No")

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

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

Solution (Python):
S = input()
T = input()
t = S
flag = False
for i in range(len(S)):
    t = S[1:] + S[0]
    if t == T:
        flag = True
        break
    S = t

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

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

Solution (Python):
s=input()
t=input()
list1=list(s)
list2=list(t)
for i in range(100):
	list1.append(list1[0])
	list1.pop(0)
	if list1==list2:
		print("Yes")
		exit() 
		
print("No")

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

if T in S+S:
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
s = str(input())
t = str(input())
s_list = []
t_list = list(t)
n = 0

while n < len(s):
    for i in range(0,len(s)):
        if n+i < len(s):
            s_list.append(s[n+i])
        else:
            s_list.append(s[n+i-len(s)])
    if t_list == s_list:
        print("Yes")
        break
    s_list = []
    n += 1
else:
    print("No")

Solution (Python):

s = str(input())
t = str(input())

slen = len(s)
tlen = len(t)

if slen != tlen:
    print("No")

for i in range(slen):
    if s == t:
        print("Yes")
        break
    s = s[-1] + s[:-1]

if s != t:
    print("No")

Solution (Python):

S = input()
T = input()

N = len(S)

tmp = S


isOk = False
for i in range(N):
    if tmp == T:
        isOk = True
        break
    tmp = tmp[1:] + tmp[0]

if tmp == T:
    isOk = True

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

Solution (Python):
S=input()
T=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()

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

Solution (Python):
s=list(input())
t=list(input())
c=0
for i in range(len(s)):
  u=[s[j] for j in range(i,len(s))]
  if i>0:
    for k in range(0,i):
      u.append(s[k])
  if t==u:
    c=1
    break
if c==1: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[:-1]
print('No')

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

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

print('No')

Solution (Python):
"""
B - String Rotation
愚直に変換してチェックする
"""

s = input()
test = input()

for i in range(len(s)):
    s_right = s[i:]
    s_left = s[:i]

    s_rot = s_right + s_left
    
    

    if s_rot == test:
        print("Yes")
        break
else:
    print("No")

Solution (Python):

"""
B - String Rotation
https://beta.atcoder.jp/contests/abc103/tasks/abc103_b

"""
import sys
from sys import stdin
input = stdin.readline


def solve(s, t):
    for _ in range(len(s)):
        if s == t:
            return 'Yes'
        s = s[1:] + s[0]
    return 'No'


def main(args):
    s = input().strip()
    t = input().strip()
    ans = solve(s, t)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

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

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

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

Solution (Python):


def match_rotation(s,t):
    for i in s:
        s = s[1::] + s[0]
        if s == t:
            return 'Yes'
    else:
        return 'No'


S = str(input())
T = str(input())


print(match_rotation(S, T))

Solution (Python):


def match_rotation(s,t):
    for i in s:
        s = s[1::] + s[0]
        if s == t:
            return 'Yes'
            break
    else:
        return 'No'


S = str(input())
T = str(input())


print(match_rotation(S, T))

Solution (Python):
import sys
import numpy as np

S = np.array([c for c in input()])
T = np.array([c for c in input()])

for i in range(S.shape[0]):
    if np.all(np.roll(S, i) == T):
        print("Yes")
        sys.exit()

print("No")

Solution (Python):





S = str(input())
T = str(input())


for i in S:
    S = S[1::] + S[0]
    
    
    if S == T:
        print('Yes')
        break

else:
    print('No')

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

for i in S:
    S = S[1::] + S[0]
    if S == T:
        print('Yes')
        break
else:
    print('No')

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

for i in S:
    s = ''
    x = i
    s += S[1::1]
    s += x
    S = S[1::1] + S[0]
    
    if s == T:
        print('Yes')
        break
else:
    print('No')

Solution (Python):
s = input()
listS =list(s)
length = len(listS)
listT = list(input())
listT.extend(listT)

index=0
flag =0
while index<length:
    index2=0
    word=""
    while index2<length:
        word+=listT[index+index2]
        index2+=1
    if word == s:
        flag =1
        print("Yes")
        break
    else:
        index+=1
if flag==0:
    print("No")

Solution (Python):
s,t = [list(input()) for i in range(2)]
for i in range(len(s)):
  s.insert(0,s[-1])
  s.pop(-1)
  if s == t:
    print("Yes")
    break
  elif i == len(s)-1:
    print("No")

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

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

Solution (Python):
s_list = list(input())
t_list = list(input())
n_oneroop = len(s_list)

for _ in range(n_oneroop):
    s_list = [s_list[-1]] + s_list[:-1]
    if s_list == t_list:
        print("Yes")
        exit()
print("No")

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

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

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

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

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

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

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

Solution (Python):
print('Yes'if input()in input()*2else'No')

Solution (Python):
a=input();b=input();print(['No','Yes'][b in a*2])

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

s=s*2

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

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

start=0
while True:
    i = t.find(s[0], start)
    if i == -1:
        print('No')
        exit(0)
    elif t[i:] + t[:i] == s:
        print('Yes')
        exit(0)
    else:
        start = i+1

Solution (Python):
S=list(input())
T=list(list(input()))
ans='No'
def counter(i,max):
    a=[]
    for  j in range(i,max+1):
        a.append(j)
    for k in range(i):
        a.append(k)
    return a
for i in range(len(S)):
    a=[]
    for j in counter(i,len(S)-1):
        a.append(S[j])
    if(a==T):
        ans='Yes'
print(ans)

Solution (Python):
s = raw_input()
t = raw_input()
l = len(s)
for i in range(l):
    u = s[i:] + s[:i]
    if u == t:
        print 'Yes'
        break
else:
    print 'No'

Solution (Python):
def main():
    s = str(input())
    t = str(input())
    pos = 0
    for i in range(len(s)):
        if s[i] == t[0]:
            pos = i
            break
    l = pos
    pos = 0
    for i in range(l,len(s)):
        if(s[i] != t[pos]):
            print("No")
            return 0
        pos = pos + 1
    if pos != len(t):
        for i in range(len(s)):
            if(pos >= len(t)):
                break
            if(s[i] != t[pos]):
                print("No")
                return 0
            pos = pos + 1

    print("Yes")
main()

Solution (Python):
s,t = [input() for i in range(2)]
n = len(s)
for i in range(n):
    temp = s[n-1]
    s = s[:-1]
    s = temp + s
    if s == t:
        print('Yes')
        exit()
print('No')

Solution (Python):
S = raw_input()
T = raw_input()
a = []
for i in range (len(S)):
  A = S[len(S)-1]
  B = S[:len(S)-1]
  C = A+B
  a.append(C)
  S = C
if T in a:
  print "Yes"
else:
  print "No"

Solution (Python):
S = input()
T = input()
word = [x for x in T]
for i in range(len(word)):
    a = word[0]
    word.append(a)
    word.remove(a)
    if S == ''.join(word):
        break
    else:
        pass
if S == ''.join(word):
    print('Yes')
else:
    print('No')