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()
t = input()
flag = False
for i in range(len(s)):
    if s == t:
        flag = True
    s = s[len(s) - 1] + s[:len(s) - 1]
print('Yes' if flag else 'No')

Solution (Python):


def main():
    S, T = map(str, open(0).read().split())

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


main()

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    s = input()
    t = input()
    double = t + t
    print('Yes') if s in double else print('No')


if __name__ == "__main__":
    main()

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

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

Solution (Python):
s=input()
t=input()
for i in range(len(s)):
    s=s[-1]+s[0:-1]
    if s==t:
        print("Yes")
        exit()
print("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):
S = input()
T = input()
list_S = list(S)

if (len(S) == 1):
    if (S == T):
        print('Yes')
    else:
        print('No')
    
    exit()


def rotate_str(strr):
    n = len(strr)
    rv = strr[1:] + strr[0]
    
    return(rv)


for i in range(len(S)):
    S = rotate_str(S)
    
    if (S == T):
        print('Yes')
        exit()

print('No')

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

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

Solution (Python):
s = str(input())
n = str(input())
ans = 0
for i in range(len(s)):
    s = s[1:] + s[0]
    if s == n:
        ans = 1
        break

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

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

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

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

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

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

print('Yes') if flg else print('No')

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

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

Solution (Python):






def main():
    S = input()
    T = input()
    N = len(S)

    if S == T:
        return "Yes"

    for i in range(N):
        S = S[-1] + S[:N-1]
        if S == T:
            return "Yes"
    
    return "No"


print(main())

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7


s=input().rstrip()
t=input().rstrip()
strs=[]
for i in range(len(s)):
    j=len(s)-i
    ba=s[0:j]
    ba2=s[j:len(s)]
    
    
    
    
    neu=ba2+ba
    strs.append(neu)

if t in strs:
    print("Yes")
else:
    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.pop(0)
    s.append(a)
if ans == 1:
    print("Yes")
else:
    print("No")

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

for i in range(len(s)):
    tmp = s[-1]
    for j in range(len(s)-1):
        tmp += s[j]
    if tmp == t:
        f = True
        break
    s = tmp

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

Solution (Python):

def inputlist(): return [int(k) for k in input().split()]

S = list(input())
T = list(input())
for i in range(len(S)):
    Sa = S[:]
    S = [Sa[-1]] + Sa[:-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[len(S) - i:] + S[:len(S) - i] == T:
        a = "Yes"
        break
print(a)

Solution (Python):


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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    s=input()
    t=input()
    s+=s
    if t in s:
        print('Yes')
    else:
        print('No')
resolve()

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

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

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

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

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

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

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

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

print('Yes' if can() else 'No')

Solution (Python):


s=input()
t=input()

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

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

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):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        s=input()
        t=input()
        if s==t:
            return 'Yes'
        else:
            for i in range(1,len(s)+1):
                if s[i:]+s[0:i]==t:
                    return 'Yes'
        return 'No'
    print(main())
resolve()

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

s += s

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

print('Yes') if flag else print('No')

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

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


def rotate(s, k):
    n = len(s)
    t = s[k:n]
    t += s[0:k]
    return t


ans = "No"

for i in range(n):
    if rotate(s, i) == t:
        ans = "Yes"

print(ans)

Solution (Python):
import numpy as np
import sys
import math

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

Solution (Python):
s = list(input())
t = list(input())
length = len(s)
count = 0
for i in range(length):
  newlst = []
  newlst.append(s[length-1])
  for j in range(length-1):
    newlst.append(s[j])
  s = newlst
  if s == t:
    print("Yes")
    count += 1
    exit()
if count == 0:
  print("No")

Solution (Python):
s,t = (input() for _ in range(2))
ans ='No'

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

Solution (Python):
from collections import deque
s = deque(input())
t = deque(input())
ans = "No"
for i in range(len(s)):
    if s == t:
        ans = "Yes"
        break
    tmp = s.popleft()
    s.append(tmp)
print(ans)

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

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

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

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

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

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

Solution (Python):

import sys


YES = "Yes"  
NO = "No"  


def solve(S: str, T: str):
    print(YES if any(
        S == T[i:] + T[:i]
        for i in range(len(T))
    ) else NO)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    T = next(tokens)  
    solve(S, T)


if __name__ == '__main__':
    main()

Solution (Python):
s=list(input())
t=list(input())
flag=0
for a in range(len(s)+2):
    if s==t:
        print("Yes")
        flag=1
        break
    t.append(t.pop(0))
if flag==0:
    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):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
T = input()
if S == T:
	print("Yes")
	exit()

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

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

s += s
if t in s:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

Solution (Python):
s = input()
t = input()
s *= 2
n = len(t)
print('Yes' if any(s[i:i+n] == t for i in range(n)) else 'No')

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

init_s = s

found = False
while True:
    s = s[-1] + s[:-1]
    if s == t:
        found = True
        break
    if s == init_s:
        break

print('Yes' if found else 'No')

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

s2 = s + s

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

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

l = len(s)

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

print("No")

Solution (Python):
s = input()
t = input()
s_lst = [i for i in s]
ans = 0
for i in range(len(s_lst)):
    tmp = s_lst[len(s_lst)-1]
    s_lst.pop()
    a = []
    a.append(tmp)
    for j in s_lst:
        a.append(j)
    s_lst = a
    b = "".join(a)
    if b == t:
        ans += 1
if ans >=1:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
s= input()
t = input()
S = s+s
if t in S:
    print('Yes')
else:
    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):
s=input()
t=input()
ans='No'
l=len(s)
if s==t:
  ans='Yes'
for _ in range(l):
  s=s[l-1]+s[:l-1]
  if s==t:
    ans='Yes'
    break
print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    S=input()
    T=input()
    for i in range(len(S)):
        if S==T[i:]+T[:i]:
            YesNo(1)
            exit()
    YesNo(0)

if __name__ == '__main__':
    main()

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
MOD = 10**9+7
INF = float('inf')

def main():
    S = input()
    T = input()
    L = len(S)
    bl = False
    for i in range(L):
        s = S[-i:] + S[:-i]
        if T == s:
            bl = True
    print('Yes' if bl else 'No')





if __name__ == '__main__':
    main()

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

Solution (Python):
s = list(input())
t = list(input())
for _ in range(len(s)):
    if s == t:
        print("Yes")
        quit()
    else:
        end = s.pop(0)
        s.append(end)
print("No")

Solution (Python):
s = list(input())
t = list(input())
for _ in range(len(s)):
    if s == t:
        print("Yes")
        quit()
    else:
        end = s.pop(0)
        s.append(end)
print("No")

Solution (Python):
s = input()
t = input()
n = len(s)
for i in range(n):
    s = list(s)
    s_last = [s[n - 1]]
    u = s_last + s[0:n - 1]
    s = "".join(u)
    if s == t:
        print("Yes")
        exit()
print("No")

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

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

    s = input().rstrip()
    t = input().rstrip()

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
s=list(input())
t=list(input())
for i in range(len(s)):
    if s==t:
        print('Yes')
        exit()
    s.append(s.pop(0))
print('No')

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
S1=str(input())
S2=str(input())
NG = True
for i in range(len(S1)):
  if S1 == S2[i:len(S1)]+S2[0:i]:
    print('Yes')
    NG = False
    break
if NG:
  print('No')

Solution (Python):
















S = input()
T = input()

ans = "No"
for i in range(len(S)):
    sline = S[-i:] + S[:-i]
    if sline == T:
        ans = "Yes"
        break

print(ans)

Solution (Python):
S=input()
T=input()
flg=0
for i in range(len(S)):
    moji=str()
    for j in range(len(S)):
        word=i+j
        if word>=len(S):
            word=i+j-len(S)
        moji+=S[word]
    if moji==T:
        flg=1
        
print("Yes" if flg else "No")

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

if S == T:
        print('Yes')
        exit()

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

print('No')

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

l = len(S)

for i in range(l):
    count = 0
    for j in range(l):
        if i+j >= l:
            if S[i+j-l] == T[j]:
                count += 1
            else:
                break
        else:
            if S[i+j] == T[j]:
                count += 1
            else:
                break

    if count == l:
        print('Yes')
        exit()

print('No')

Solution (Python):
S = input()
T = input()
t = list(S)
ans = 'No'
for i in range(len(S)):
    if ''.join(t) == T:
        ans = 'Yes'
        break
    else:
        tmp = t.pop()
        t.insert(0, tmp)
print(ans)

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

Solution (Python):

import sys


def main():
    S = input()*2
    T = input()
    if T in S:
        print("Yes")
    else:
        print("No")
    return



if __name__ == '__main__':
    main()

Solution (Python):

import sys


def main():
    S = input()*2
    T = input()
    if T in S:
        print("Yes")
    else:
        print("No")
    return



if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

S = input()
T = input()
ans = "No"
for i,c in enumerate(S):
    if T == S[i+1:]+S[:i+1]:
        ans= "Yes"
print(ans)

Solution (Python):

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

for i in range(len(s)):
    if s == t:
        print("Yes")
        exit()
    else:
        s.insert(0,s[-1])
        del s[-1]

print("No")

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

Solution (Python):
icase=0
if icase==0:
    s=list(input())
    t=list(input())
    lens=len(s)
    for i in range(lens):
        yn=""
        for j in range(lens):
            jj=(i+j)%lens

            if s[j]!=t[jj]:
                yn="No"
                break
        if yn=="No":
            continue
        else:
            yn="Yes"
            break
    if yn=="No" :
        print("No")
    else:
        print("Yes")

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

if S==T:
    print("Yes")
    exit()

for i in range(l):
    S=S[-1]+S[0:-1]
    if S==T:
        print("Yes")
        exit()
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 S in T*2 else "No")

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

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

ans='No'
i=0
while i<len(S):
    if S!=T:
        S.append(S.pop(0))
    else:
        ans='Yes'
    i+=1

print(ans)

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

Solution (Python):

import io

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

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

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

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

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

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

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

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

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

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

Solution (Python):
def myAnswer(S,T):
   init = S[:]
   while True:
      S.append(S.pop(0))
      if(S == T):
         return "Yes"
      elif(init == S):
         return "No"


def modelAnswer():
   tmp=1
def main():
   S = list(input())
   T = list(input())
   print(myAnswer(S[:],T[:]))

if __name__ == '__main__':
   main()

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

Solution (Python):
def main():
    S = input()
    T = input()
    
    if S == T:
        print("Yes")
    else:
        same = False
        for i in range(len(S)):
            S = S[-1] + S[:len(S)-1]
            if S == T:
                print("Yes")
                same = True
                break
        if same == False:
            print("No")
main()

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

Solution (Python):
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

s = ns()
t = ns()

i = 0

while i < 101:
    s = s[-1] + s[:-1]
    if s == t:
        print('Yes')
        exit()
    i += 1
print('No')

Solution (Python):

s = input()
t = input()

s_dash = s[-1] + s[:-1]
isExact = 'No'

if s == t:
    isExact = 'Yes'
else:
    while s != s_dash:
        if s_dash == t:
            isExact = 'Yes'
            break
        s_dash = s_dash[-1] + s_dash[:-1]

print(isExact)

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

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

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

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

ans = False
for i in range(len(t)):
    if s == t[len(t) - i:] + t[:len(t) - i]:
        ans = True
        break

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

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

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

Solution (Python):
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

s = list(input())
t = input()
for i in range(len(s)):
    ans = ""
    cnt = 0
    for j in range(-1,len(s)-1):
        ans += s[j]
    res = ""
    for j in range(len(s)):
        s[j] = ans[j]
        res += s[j]
    if res == t:
        print("Yes")
        sys.exit()
print("No")

Solution (Python):
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
def main():
    s = IS()
    t = IS()
    for i in range(len(s)):
        if t == s[i:] + s[0:i]: print('Yes'); exit(0)
    else:
        print('No')

if __name__ == '__main__':
    main()

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

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

Solution (Python):
S = list(input())
T = list(input())
D = S*2
flag = 0

for i in range(len(T)):
    for j in range(len(T)):
        if D[i+j] != T[j]:
            break
    else:
        flag = 1

def yn(p):
    if p:
        return "Yes"
    else:
        return "No"
print(yn(flag == 1))

Solution (Python):
from collections import deque
S = deque(list(input()))
T = deque(list(input()))



for i in range(len(S)):
    if S == T:
        print('Yes')
        exit()
    s = S.pop()
    S.appendleft(s)
if S == T:
    print('Yes')
    exit()
print('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):
s=list(input())
t=list(input())
n=len(s)
for _ in range(n):
        s=[s[n-1]]+s[:n-1]
        if s==t:
            print("Yes")
            break
else:
    print("No")

Solution (Python):
print(["No","Yes"][input() in input()*2])

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

if (S == T):
    print("Yes")
    exit(0)

s = S[-1] + S[:-1]
while s != S:
    if (s == T):
        print("Yes")
        exit(0)
    s = s[-1] + s[:-1]

print("No")

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

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

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

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

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

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

Solution (Python):
s=input()
t=input()
if s==t:
    print("Yes")

else:
    flag=True
    for i in range(1,len(s)):
        if s[0:i]==t[len(s)-i:len(s)] and s[i:len(s)]==t[0:len(s)-i]:
            print("Yes")
            flag=False
            exit()

    if flag:
        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):
S=list(input())
T=list(input())
for i in range(len(S)):
    S=list(S[len(S)-1])+S[:len(S)-1]
    if S==T:
        print("Yes")
        exit()
print("No")

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

Solution (Python):
a =input()
b = input()
ans =''
for i in range(len(a)):
    ans +=a[len(a)-1]
    for j in range(len(a)-1):
        ans+=a[j]
    if ans ==b:
        print('Yes')
        break
    elif (i+1) ==len(a):
        print('No')
    a=ans
    ans =''

Solution (Python):
s=list(input())
t=list(input())
length=len(s)
ans=0

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

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

for i in range(l):
  L = s[:(l-i)]
  R = s[(l-i):]
  ns = R + L
  if (ns == t):
    print("Yes")
    break
  else:
    if (i == (l-1)):
      print("No")
    else:
        continue

Solution (Python):
def rotation(string):
    result = string[-1]
    for i in range(len(string)-1):
        result += string[i]
    return result

S = input()
T = input()

flag = False
for i in range(len(S)):
    S = rotation(S)
    if T == S:
        flag = True
        break

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

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

for i in range(l):
    if S==T:
        break
    S=S[l-1]+S[0:l-1]

print('Yes' if S==T else 'No')

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

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

print('No')

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

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

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

def lotate(s, i) :
   return(s[i:] + s[:i])

for i in range(len(S)):
  Sl = lotate(S, i)
  if Sl == T :
    print('Yes')
    exit(0)
print('No')

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

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

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

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

Solution (Python):
S = str(input())
T = str(input())
ans = 'No'
s = [S[i] for i in range(len(S))]
for i in range(len(S)):
    s.append(S[i])
for i in range(len(S)):
    fr = 0
    for j in range(len(S)):
        if s[i + j] != T[j]:
            fr += 1
            break
    if fr == 0:
        ans = 'Yes'
print(ans)

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

Solution (Python):
S = list(input())
T = input()
len_S = len(S)
ans = "No"

for i in range(len_S):
    new_S = ""
    for j in range(i, len_S):
        new_S += S[j]
    for k in range(0, i):
        new_S += S[k]
    if new_S == T:
        ans = "Yes"
        break

print(ans)

Solution (Python):
s = input()
t = list(input())
f=len(t)
while(f):
    if s == "".join(t):
        print("Yes")
        break
    else:
        t.append(t.pop(0))
    f-=1
else:
    print("No")