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):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
T = input()
def_S = S

while(1):
    S = S[-1] + S[0:-1]
    if S == T:
        print("Yes")
        os.sys.exit()
    if def_S == S:
        print("No")
        os.sys.exit()

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

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

can = False
for i in range(len(s)):
    if s == t:
        can = True
        break
    slist = list(s)
    tmp = slist[0]
    del(slist[0])
    slist.append(tmp)
    s = ''.join(slist)

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

Solution (Python):
S = list(input())
T = input()
s_tmp = S.copy()
if ''.join(S) == T:
  print('Yes')
else:
  while True:
    s_reversed = s_tmp[:-1]
    s_reversed.insert(0, s_tmp[-1])
    if ''.join(s_tmp) == T:
      print('Yes')
      break
    elif S == s_reversed:
      print('No')
      break
    s_tmp = s_reversed

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

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

Solution (Python):
S = input()
T = input()
S_list = []
T_list = []
n = 0
for i in range(len(S)):
    S_list.append(S[i])
    T_list.append(T[i])
for j in range(len(S)):
    if S_list == T_list:
        n = 1
        break
    else:
        a = T_list[0]
        T_list.append(a)
        T_list.remove(a)
if n == 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')
        break
    tmp = s.pop()
    s.insert(0, tmp)

else:
    print('No')

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

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

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

b = s * 2

if t in b:
    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()

length = len(S)
lst = []

for i in range(length):
    lst.append(S[i: length]+S[0: i])
    
if T in lst:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    s = input()
    t = input()

    t2 = t + t

    print("Yes" if t2.count(s) >= 1 else "No")

Solution (Python):
s = list(input())
t = list(input())
tmp = s[:]
ans = 'No'
for i in range(len(s)):
    _tmp = list(tmp.pop(-1))
    for j in range(len(tmp)):
        _tmp.append(tmp[j])
    if _tmp == t: ans = 'Yes'
    tmp = _tmp[:]
print(ans)

Solution (Python):
s = input()
t = input()
c = 1
for i in range(len(s)):
  s = s[-1] + s[:-1]
  if s == t:
    c = 0
print('YNeos'[c::2])

Solution (Python):
s = list(input())
t = list(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()

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

print("No")

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

Solution (Python):
import copy
s = input()
t = input()
flag = True
listed_s = list(s)
swaped_s = list(s)
for i in range(len(s)):
    if ("".join(listed_s) == t) and (flag):
        flag = False
        print("Yes")
    swaped_s = [listed_s[-1] for i in range(len(s))]
    for i in range(len(s) - 1):
        swaped_s[i + 1] = listed_s[i]
    listed_s = copy.copy(swaped_s)
    if ("".join(listed_s) == t) and (flag):
        flag = False
        print("Yes")

if flag:
    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):
import sys
s = input()
t = input()

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

Solution (Python):
from collections import deque
S = deque(list(input()))
T = deque(list(input()))
count = 0
if S==T:
    print("Yes")
else:
    for _ in range(len(S)-1):
        s = S.pop()
        S.appendleft(s)
        if S==T:
            count += 1
    if count>0:
        print("Yes")
    else:
        print("No")

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

flag = False

def rotate_string(string):
  return "".join((string[-1], string[:-1]))



if S == T:
  print("Yes")
  flag = True

for i in range(len(S)):
  S = rotate_string(S)
  if S == T:
    if not flag:
      print("Yes")
      flag = True
      break
    
if not flag:
  print("No")

Solution (Python):
s1=str(input())
s2=str(input())
n=len(s2)
for i in range(n):
    if s1==s2:
        print("Yes")
        exit()
    else:
        s2=s2[-1]+s2[:n-1]
print("No")

Solution (Python):



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

for i in range(len(s)):
    x = s.pop()
    s.insert(0,x)
    if s == t:
        print('Yes')
        quit()
print('No')

Solution (Python):
a = input()
b = input()
c = 0

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

Solution (Python):
import sys
listS=list(input())
listT=list(input())
LEN=len(listS)
for i in range(LEN):  
  listS.insert(0,listS[LEN-1])
  del listS[LEN]
  if listS==listT:
    print("Yes")
    sys.exit()
print("No")

Solution (Python):

def rotation(s,t):
    if sorted(s) != sorted(t):
        return False
    canRotate = False
    for int in range(len(s)):
        if s != t:
            s_list = list(s)
            temp = s_list.pop(len(s)-1)
            s = ''.join(s_list)
            s = temp + s
        elif s == t:
            canRotate = True
            break
    return canRotate

s = input()
t = input()
yesno = rotation(s,t)
if yesno == True:
    print('Yes')
else:
    print('No')

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

for i in range(len(S)):
    a = S.pop(0)
    S.append(a)
    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 = list(input())
t = list(input())

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

Solution (Python):
s1 = input()
s2 = input()
if (s1 + s1).find(s2) >= 0:
  print("Yes")
  quit()

print("No")

Solution (Python):
s = input()
t = input()
flag = False
for i in range(len(s)):
    flagi = True
    for j in range(len(s)):
        if(s[j] != t[(i+j) % len(s)]):
            flagi = False

    if(flagi):
        flag = True
if(flag):
    print("Yes")
else:
    print("No")

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

print("No")

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

cnt=0
while True:
    if s==t:
        print("Yes")
        break
    
    elif cnt==len(s)-1:
        print("No")
        break
    
    ans1=s[-1]
    ans2=s[:-1]
    ans=ans1+ans2
    s=ans
    cnt+=1

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

for i in range(len(S)):
    if S == T:
        print("Yes")
        break

    T = T[-1] + T[:-1]

else:
    print("No")

Solution (Python):
s, t = (input() for i in range(2))

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

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

s_len=len(s)

res='No'

s_mod=s

if s_mod==s2:
  res='Yes'
else:
	for i in range(1,s_len+1):
		s_mod=s_mod[-1]+s_mod[:-1]
		if s_mod==s2:
			res='Yes'
			break

print(res)

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

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

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

Solution (Python):
s = input()
t = input()
cnt = 1
for _ in range(len(s)):
    a = s[len(s)-1]
    b = [s[i] for i in range(len(s)-1)]
    bb = "".join(b)
    s = a+bb
    if s == t:
        cnt *= 0

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

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

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

Solution (Python):
s = input()
t = input()
print('Yes' if (s+s).count(t)>0 else 'No')

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

N = len(S)

flag = False
for i in range(N):
  for j in range(N):
    if S[i+j-N] != T[j]:
      break
    if j == N-1:
      flag = True

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

Solution (Python):
a = input()
b = input()

def rec(a,b,c):
    if c==len(b)+1:
        return False
    if b == a:
        return True
    newb = b[len(b)-1]+b[0:-1]
    c+=1
    return rec(a,newb,c)
    

if rec(a,b,0):
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

S = s()
T = s()

for i in range(len(S)+1):
    SD = S[len(S)-i:] + S[:len(S)-i]
    if T == SD:
        print('Yes')
        import sys
        sys.exit()

print('No')

Solution (Python):
import sys
S = input()
T = input()
flag = 0
for i in range(len(S)): 
    st1 = S[:i+1]
    st2 = S[i+1:]
    st3 = T[-i-1:]
    st4 = T[:-i-1]
    if st1 == st3 and st2 == st4:
        flag = 1
if flag == 0:
    print("No")
else:
    print("Yes")

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

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

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

for i in range(N):
    t = S[-1] + S[:-1]
    S = t
    if t == T:
        flag = True
        break

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

Solution (Python):

S = input()
T = input()


bul = "No"
for i in range(len(S)):

    if S == T:
        bul = "Yes"
        break

    S = S[-1] + S[:-1]

print (bul)

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

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

Solution (Python):
S = input()
T = input()
org = T
if S == T:
    print('Yes')
    exit()
    
for i in T:
    T = T[1:] + T[0]
    if T == S:
        print('Yes')
        exit()
    elif T == org:
        print('No')
        exit()

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

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

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

Solution (Python):
import numpy as np

S_line = input()
T_line = input()

length = len(S_line)

index_list = []
def index_maker(start_n, length):
    for loc in range(length):
        if loc > start_n:
            index_list.append(loc)
        
    for loc in range(start_n + 1):
        
        index_list.append(loc)
    if start_n + 1 == length:
        return list(range(length))

    return(index_list)

ac_flag = 0
index_list = []
y_flag = 0

for i in range(length):
    index_list = index_maker(length-1 - i, length)
    
    for i, index in enumerate(index_list):
        
        if T_line[i] != S_line[index]:
            ac_flag += 1
    if ac_flag == 0:
        y_flag += 1
    ac_flag = 0
    index_list = []

if y_flag != 0:
    print("Yes")
else:
    print("No")

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

ok = False
for _ in range(len(s) + 1):
  if s == t:
    ok = True
    break
  s = s[-1] + s[0:-1]

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

Solution (Python):
s = list(input())
t = input()
flag = 0
  
for i in range(len(s)):
  tmp = s.pop(-1)
  s.insert(0, tmp)
  if "".join(s) == t:
    print("Yes")
    flag = 1
    break

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

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

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

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

Solution (Python):
def abc():
    s = list(input().rstrip())
    t = list(input().rstrip())

    for i in range(len(s)):
        if s == t:
            print('Yes')
            return
        s.append(s.pop(0))
    print('No')


abc()

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

for i in range(len(S)):
    if S == T:
        print('Yes')
        break
    elif S != T:
        S.insert(0,S[-1])
        del S[-1]
    if i == len(S)-1:
        print('No')

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

count=0
for i in range(len(s)):
    x=s[-i:]+s[:-i]
    if x==t:
        print('Yes')
        break
    else:
        count+=1
if count==len(s):
    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)

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

Solution (Python):

import time
import re
import math

def main():
    s=input()
    t=input()
    f=0
    for a in range(len(s)):
        if s==t:
            f=1
        s=s[-1]+s[0:-1]
    if(f==1):print("Yes")
    else:print("No")


main()

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

L = len(S)

bl = False
for i in range(L):
  if S[i:] == T[:L-i] and S[:i] == T[L-i:]:
    bl = True

answer = 'Yes' if bl else 'No'
print(answer)

Solution (Python):
a = input()
b = input()

original = a
lengtha = len(a)

if a == b:
        print("Yes")
        quit()

for i in range(lengtha):
        a = a[-1] + a[0:-1]
        if a ==b:
                print("Yes")
                quit()

print("No")

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

ans = "No"
c = len(s)
for i in range(c):
  for j in range(c):
    si = s[(j+i)%c:(j+i)%c+1]
    tj = t[j:j+1]
    
    if si != tj:
      break
  else:
    ans = "Yes"
    break
    
print(ans)

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

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

a = T + T
ok = False
for i in range(len(S)):
    ok |= a[i:len(S)+i] == S

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

Solution (Python):
s = list(input())
t = list(input())
if sorted(s) != sorted(t):
  print('No')
else:
  msg = 'No'
  for i in range(len(s)):
    ss = s[i:] + s[:i]
    if ss == t:
      msg = 'Yes'
      break
  print(msg)

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

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

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

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

if flag:
    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")
    exit()
print("No")

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

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

Solution (Python):


s = input()
t = input()


def round(s_local):
  s_list = list(s_local)
  last_letter = s_list.pop(0)
  s_list.append(last_letter)
  return "".join(s_list)

answer = "No" 
for i in range(len(s)):
  s = round(s)
  if (s == t):
    answer = "Yes"
    break



print(answer)

Solution (Python):
from collections import deque

S = deque(input())
T = deque(input())

ans = 'No'
for _ in range(len(S)):
    S.appendleft(S.pop())
    if S == T:
        ans = 'Yes'
        break

print(ans)

Solution (Python):



import sys

input = sys.stdin.readline

def main():
    S = input().strip()
    T = input().strip()
    for i in range(len(T)):
        t = T[i:] + T[0:i]
        if t == S:
            print("Yes")
            return
    print("No")

main()

Solution (Python):
S=list(input())
T=list(input())
x=len(S)
y=0
for i in range(x):
  S.append(S[0])
  del S[0]
  if S==T:
    y=1
  else:
    pass
  
if y==1:
  print("Yes")
else:
  print('No')

Solution (Python):
a=input()
b=input()
print("NYoe s"[b in a*2 ::2])

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

for i in range(len(S)):
    x = S[-1]
    S = list(S)
    S.pop(-1)
    S.insert(0,x)
    S = ''.join(S)
    if S == T:
        print('Yes')
        exit()

print('No')

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

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

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

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

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

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

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

Solution (Python):
from collections import deque

d = deque(input())
w = input()
ac = False
for i in range(len(d)):
  word = ""
  a = d.pop()
  d.appendleft(a)
  word = "".join(d)
  if word == w:
    ac = True
    break
if ac:
  print("Yes")
else:
  print("No")

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

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

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

if check == 1:
    print('Yes')
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)):
  if T == (S[i:] + S[:i]):
    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')
    exit()
print('No')

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

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

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

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

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

SS = S + S

if T in SS : 
    print("Yes")
else : 
    print("No")

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

Solution (Python):
s = [str(x) for x in input()]
t = [str(x) for x in input()]

def solve(s_list,t_list,n):
    if n== 120:
        return print("No")
    a = s_list.pop(-1)
    s_list.insert(0,a)
    if s_list ==t_list:
        return print("Yes")
    else:
        solve(s,t,n+1)

solve(s,t,0)

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np

def main():
	S = list(input())
	T = list(input())
	
	for i in range(len(S)):
		tmp = S.pop(-1)
		S.insert(0, tmp)
		if S == T:
			print("Yes")
			sys.exit()
		
	print("No")
	
if __name__ == "__main__":
	main()

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

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

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

dic = True if S==T else False
cnt = 1

while not dic and cnt <= len(S):
    ss = S[-cnt:] + S[:-cnt]
    if ss == T:
        dic = True
    cnt += 1

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

Solution (Python):
s = list(input())
t = list(input())
flag = False
for i in range(len(s)+1):
  s1 = s.pop(0)
  s.append(s1)
  if s==t:
    flag = True
    
if flag:
  print('Yes')
else:
  print('No')

Solution (Python):
s = list(input())
t = list(input())
flag = False
for i in range(len(s)+1):
  s1 = s.pop(0)
  s.append(s1)
  if s==t:
    flag = True
    
if flag:
  print('Yes')
else:
  print('No')

Solution (Python):
s1=list(input())
s2=list(input())
f=0
for i in range(len(s1)+1):
    if s1==s2:
        f+=1
    a=s1.pop(0)
    s1.append(a)
if f>0:
    print('Yes')
else:
    print('No')

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()
ans = 'No'

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

print(ans)

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

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

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

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

x = [""]*len(s)

for i in range(len(s)):
    for j in range(len(s)):
        x[j] = s[j-i-1]
    y="".join(x)
    if t in y:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
a= input()
b=input()
ok="No"
for i in range(len(a)):
  if b==a[i:] + a[:i]:
    ok="Yes"
print(ok)

Solution (Python):
S0 = input().strip()
S1 = input().strip()
ok = "No"
for i in range(len(S0)):
  if S0 == S1[i:] + S1[:i]:
    ok = "Yes"
print(ok)

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, t = input(), input()
ls = len(s)

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

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

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

print("No")

Solution (Python):
S = raw_input()
T = raw_input()
Slist = []
Tlist = []
for i in range(0, len(S)):
	Slist.append(S[i])
	Tlist.append(T[i])
flag = False
for i in range(0, len(S)):
	if Slist == Tlist:
		flag = True
		break
	x = Slist.pop(0)
	Slist.append(x)
if flag: print 'Yes'
else: print 'No'

Solution (Python):
S=input()
T=input()
l=[]


for i in range(len(S)):
    l.append(S[i:]+S[:i])
if T in l:
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  

def solve(S: str, T: str):
    print( YES if T in [ S[i:]+S[:i] for i,s in enumerate(S) ] 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 = input()
t = input()
flag = False

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

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

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

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

Solution (Python):
s=input()
t=input()
s1=s[1:]
for sk in s:
    s1=s1+sk
    if t==s1:
        print("Yes")
        break
    s1=s1[1:]
else:
    print("No")

Solution (Python):
import sys

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

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

print("No")

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

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

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

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

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

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

Solution (Python):
import copy

S = input()
T = input()

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

print(ans)

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

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

Solution (Python):
x = input()
y = input()
b = 0
for i in range(len(x)):
  if x[i:] + x[:i] == y:
    b=1
    break


if b == 1:
  print('Yes')
else:
  print('No')

Solution (Python):
def rotation(st):
    return st[-1]+st[0:-1]
s = input()
t = input()
flg = 0
tmp_s = s
for _ in range(len(s)):
    tmp_s = rotation(tmp_s)
    if tmp_s ==t:
        print("Yes")
        flg = 1
        break
if flg==0:
    print("No")

Solution (Python):
import sys

s = input()
t = input()
check = []
check.append(t[len(t)-1]+t[0:len(t)-1])
for i in range(1, len(t)+1):
    check.append(check[i-1][len(t)-1]+check[i-1][0:len(t)-1])
    if s == check[i-1]:
        print('Yes')
        sys.exit()
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()
ans = False
for i in range(len(s)):
	if s == t[-i:] + t[:-i]:ans = True
print('Yes' if ans else 'No')

Solution (Python):
from sys import stdin

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

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

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

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

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

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

Solution (Python):
S = input()
T = input()
s = len(S)
def hantei():
    for i in range(s):
        p = 0
        for j in range(s):
            if S[(j + i) % s] != T[j]:
                p = 1
        if p == 0:
            return("Yes")
    return("No")

print(hantei())