peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
N = int(input())
S = input()

front = S[0:N]
back = S[N:]
print(back+front)
# Judge status: Wrong Answer
alpha = str(input())

if alpha > "A" and alpha < "Z":
    print("A")
else:
    print("a")
# Judge status: Accepted
N,M = map(int,input().split())
X = list(map(int,input().split()))
X.sort()
if M <= N :
    ans = 0
else:
    Y = []
    for i in range(M-1):
        Y.append(X[i+1] - X[i])
    Y.sort(reverse=True)
    ans = X[-1] - X[0]
    Y = Y[:N-1]
    for i in Y:
        ans -= i
print(ans)
# Judge status: Accepted
K = int(input())

S = input()

if len(S) <= K:
    print(S)
else:
    print(S[:K] + "...")
# Judge status: Wrong Answer
n = int(input())
num = list(map(int,input().split()))
lis = [0]*(max(num)+2)
for i in num:
    lis[i-1] +=1
    lis[i] +=1
    lis[i+1] +=1
print(lis)
print(max(lis))
# Judge status: Wrong Answer
import numpy as np
 
mod = 10 ** 9 + 7
 
N = int(input())
A = np.array(list(map(int, input().split())))
 
 
tmp = 0
for n in range(len(bin(max(A)))-2):   # 最大桁数は、最も大きい数値の2進数の桁数
    num_1 = np.count_nonzero((A >> n)&1)   # 1の数をカウント
    print((A >> n)&1)
    num_0 = N - num_1                      # 0の数をカウント
    mul = num_1 * num_0   # 0 XOR 1の回数
    tmp += ((2 ** n)*mul) % mod

print(tmp%mod)
# Judge status: Wrong Answer
n,w=map(int,input().split())
mer=[list(map(int,input().split())) for i in range(n)]
dp=[[0]*w for i in range(n+1)]
for i in range(1,n+1):
    for j in range(1,w+1):
        if j>=mer[i-1][0]:
            dp[i][j-1]=mer[i-1][1]+dp[i-1][j-mer[i-1][0]-1]
        dp[i][j-1]=max(dp[i][j-1],dp[i-1][j-1])
print(dp[-1][-1])
# Judge status: Accepted
import itertools


num_sticks = int(input())

sticks = list(map(int, input().split()))

stick_combinations = list(itertools.combinations(sticks, 3))

counter = 0

for a, b, c in stick_combinations:
    if a == b or b == c or c == a:
        continue

    if abs(b - c) < a < (b + c):
        counter += 1

print(counter)
# Judge status: Accepted
a = list(input())
a.sort()
if a[0] == a[1] and a[2] == a[3] and a[1] != a[2]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
s=input()
k=int(input())
n=min(len(s),k)
ans=1
for i in range(n):
    if s[i]!="1":
        ans=str(s[i])
        break
print(ans)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse = True)

ans = sum(A[:N // 2]) * 2 - A[0]

print(ans)
if N % 2 == 1:
    ans += A[N // 2]

print(ans)
# Judge status: Wrong Answer
N = list(input())

N[3] = "8"

print(N)
date = ''.join(N)
print(date)
# Judge status: Accepted
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    p,q,r=INTM()
    print(min(p+q,q+r,r+p))
if __name__ == '__main__':
    do()
# Judge status: Wrong Answer
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())), dtype="int64")
p = 7 + 10**9

ans = 0

for i in range(n-1):
    ans += np.sum(a[i+1:] ^ a[i]) % p

print(ans % p)
# Judge status: Wrong Answer
n, m = map(int, input().split())
x = sorted(set(map(int, input().split())))
t = []
for i, j in zip(x, x[1:]):
    t += [i - j]
t = sorted(t, reverse=True)
print(sum(t[n-1:]))
# Judge status: Accepted
from math import sqrt

N, D = map(int, input().split())

X = [tuple(map(int, input().split())) for _ in range(N)]

ans = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        tmp = 0
        for k in range(D):
            tmp += (X[i][k] - X[j][k]) ** 2
        if tmp == int(sqrt(tmp)) ** 2:
            ans += 1

print (ans)
# Judge status: Accepted
S = input()

ans = 0
tmp = 0
for i in S:
    if i == 'R':
        tmp += 1
    else:
        ans = max(tmp,ans)
        tmp = 0

ans = max(tmp,ans)

print(ans)
# Judge status: Wrong Answer
s = input()
a = int(s[:2])
b = int(s[2:])
if a<=12 and b<=12:
    print('AMBIGUOUS')
elif a<=99 and 0<b<=12:
    print('YYMM')
elif 0<b<=12 and 0<a<=99:
    print('MMYY')
else:
    print('NA')
# Judge status: Accepted
s = list(input())
t = list(input())
s.sort()
t.sort(reverse=True)
s = ''.join(s)
t = ''.join(t)
if s < t:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a = input()
l = a.split()
n = int(l[0])
k = int(l[1])
b = input()
ll = b.split()
for i in range(0,n):
    ll[i] = int(ll[i])
if n<k+1:
    print(0)
else:
    p = 0
    ll.sort()
    for i in range(0,n-k):
        p = p + ll[i]
    print(p)
# Judge status: Wrong Answer
text = "".join(reversed(input()))
words = map(lambda word: "".join(reversed(word)), ["dreamer", "dream", "eraser", "erase"])

for word in words:
  text = text.replace(word, " ")

print("YES" if text.strip() == "" else "NO")
# Judge status: Accepted
N=int(input())
d=[int(s) for s in input().split()]
ans=0
for i in range(N-2):
    if d[i]<d[i+1]<d[i+2] or d[i+2]<d[i+1]<d[i]:
        ans+=1
print(ans)
# Judge status: Wrong Answer
n = int(input())
ans=1
for i in range(1,n):
       ans*=i
ans=ans%(1000000007)
print(ans)
# Judge status: Accepted
W,H,x,y=map(int,input().split())
a = 0
if x==W/2 and y == H/2:
  a=1
print(W*H/2,a)
# Judge status: Wrong Answer
n, k = map(int, input().split())
A = list(map(int, input().split()))
A = [a - 1 for a in A]
visited = [0] * n

i = 0
lp = 0
step = []
while visited[i] == 0:
  visited[i] = 1
  next_visit = A[i] 
  step.append(i)
  lp += 1
  i = next_visit

lp_start = step.index(i)
syuki = lp - lp_start

if lp_start > k:
  ans = step[k]
else:
  cnt = (k - lp_start) % syuki
  ans = step[lp_start:][cnt] + 1

print(ans)
# Judge status: Wrong Answer
n = int(input())
array = list(map(int, input().split()))

bob = []
alice = []
for i in range(1, n+1):
    if i % 2 == 1:
        max_value = max(array)
        array.remove(max_value)
        alice.append(max_value)
    else:
        min_value = min(array)
        array.remove(min_value)
        bob.append(min_value)

print(sum(alice)-sum(bob))
# Judge status: Accepted
MOD = 10**9+7

n = int(input())
print((pow(10, max(n, 0), MOD) - pow(9, max(n, 0), MOD) -
       pow(9, max(n, 0), MOD) + pow(8, max(n, 0), MOD)) % MOD)
# Judge status: Accepted
n,k = map(int, input().split())
d = {}
for _ in range(n):
  a,b = map(int, input().split())
  if a not in d: d[a] = b
  else: d[a] += b

t = 0
for i in sorted(d.items(), key=lambda x:x[0]):
  t += i[1]
  if t >= k:
    print(i[0])
    exit()
# Judge status: Wrong Answer
a=list(map(int,input().split()))
print(a[0]+a[1]+a[2])
# Judge status: Accepted
n = int(input())
ans = 0

for i in range(1, n + 1):
  k = n // i
  ans += i * k * (k + 1) // 2

print(ans)
# Judge status: Accepted
n, d = map(int, input().split())
T = [list(map(int, input().split())) for _ in range(n)]

ans = 0

for i in range(n - 1):
    for j in range(i + 1, n):
        tmp = 0

        for k in range(d):
            tmp = tmp + (T[i][k] - T[j][k]) ** 2

        tmp = tmp ** 0.5

        if tmp == int(tmp):
            ans = ans + 1

print(ans)
# Judge status: Wrong Answer
n,m=map(int,input().split())
a=[input() for i in range(n)]
b=[input() for i in range(m)]

#二次元配列の部分配列を抽出する手法
#[l[i:m+i] for l in a[i:m+i]]
for i in range(n-m):
    for j in range(n-m):
        if [l[i:m+i] for l in a[i:m+i]]==b:
            print('Yes')
            exit()

print('No')
# Judge status: Wrong Answer

def main():
    S = list(input())
    T = list(input())
    d = {}
    for k in set(T):
        d[k] = set()
    for s, t in zip(S, T):
        if s != t:
            d[t].add(s)
    if all([len(v) == 1 for v in d.values()]):
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()
# Judge status: Accepted
h1,m1,h2,m2,k = map(int,input().split())
t1=60*h1+m1
t2=60*h2+m2
print(t2-t1-k)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
s=sum(map(abs,a))
m=min(list(map(abs,a)))
z=[]
for i in range(n):
    if a[i]<0:
        z.append(a[i])

if len(z)%2:
    print(s-2*m)
else:
    print(s)
# Judge status: Accepted
n, p = map(int, input().split())
a = list(map(int, input().split()))
mod = {0:0, 1:0}
for i in a:
    mod[i % 2] += 1
ans = 0
for i in range(p, mod[1] + 1, 2):
    temp = 1
    for j in range(i):
        temp *= mod[1] - j
        temp //= j + 1
    ans += temp
for i in range(mod[0]):
    ans *= 2
print(ans)
# Judge status: Wrong Answer
ans = []
n = int(input())
w = list(map(int, input().split()))

for t in range(1, n):
    s1 = []
    s2 = []
    for i in w:
        if t >= i:
            s1.append(i)
        elif t < i:
            s2.append(i)

    ans.append(abs(sum(s1) - sum(s2)))
print(min(ans))
# Judge status: Accepted
# -*- coding: utf-8 -*-
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():
    print(len(set(list(map(int,input().split())))))

if __name__ == '__main__':
    main()
# Judge status: Accepted
a, b, c, d = map(int, input().split())
if (c + b - 1) // b <= (a + d - 1) // d:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n, m = map(int, input().split())
ab = [tuple(map(int, input().split())) for _ in range(n)]
ab = sorted(ab, key=lambda x: x[0])
ans = 0
for a, b in ab:
    if m - b > 0:
        ans += a*b
        m -= b
    elif m == b:
        ans += a*b
        m -= b
        break
    else:
        ans += a*m
        break
print(ans)
# Judge status: Accepted
import sys

s = input()

used_dict = {}

for l in s:
    if l in used_dict:
        print('no')
        sys.exit()
    else:
        used_dict[l] = True

print('yes')
# Judge status: Wrong Answer
for i in range(int(input()), 1, -1):
    if i**(1/2) % 1 == 0:
        print(i)
        break
# Judge status: Wrong Answer
n,a,b,c,d = map(int,input().split())
s = input()
if c<d:
  if "##" not in s:
    print("Yes")
  else:
    print("No")
else:
  if "..." in s[b-1:d]:
    print("Yes")
  else:
    if s[d-2]=="#":
      print("No")
    else:
      print("Yes")
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

if N == 0 and A[0] == 1:
    print(1)
    exit()

if A[0] != 0:
    print(-1)
    exit()
    
sum_leaf = sum(A)
ans = 1
before_top = 1
for i in range(1, len(A)):
    if A[i] <= before_top*2:
        ans += min(sum_leaf, before_top*2)
        before_top = min(sum_leaf, before_top*2) - A[i]
        sum_leaf -= A[i]
    else:
        print(-1)
        exit()

print(ans)
# Judge status: Wrong Answer
n, m = map(int, input().split())

if n >= 3 and m >= 3:
    print((n-2)*(m-2))
if (n >= 3 and m == 2) or (n == 2 and m >= 3) or (n == 2 and m == 2):
    print(0)
if (n == 1) or (m == 1):
    print(max(n, m) - 2)
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))

if (N-1) % (K-1) == 0:
    print((N-1)//(K-1))
else:
    print(1 + (N-1)//(K-1))
# Judge status: Accepted
s = input().split()
t = [int(p) for p in s]
#print(t)

ans = 'Odd'
for i in range(2):
    if t[i] % 2 == 0:
        ans = 'Even'
print(ans)
# Judge status: Accepted
N,K=map(int,input().split())
H=sorted(map(int,input().split()))[::-1]
print(sum(H[K:]))
# Judge status: Wrong Answer
n = int(input())
a = [0] * n
b = [0] * n
for i in range(n):
    a[i], b[i] = map(int, input().split())

am = 0
bm = 0
for i in range(n):
    am += a[i]
    bm = max(bm, b[i])
    if a[i] > b[i]:
        print("No")
        exit()
    
if am <= bm:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
def common_member(a, b): 
    a_set = set(a) 
    b_set = set(b) 
    if (a_set & b_set): 
        return a_set & b_set
    else: 
        return "a"

L = list(map(int,input().split()))
L1 = list(map(int,input().split()))
L2 = list(map(int,input().split()))
LL = L + L1 + L2
N = int(input())
M = []
for i in range(N):
    ML = input()
    M.append(int(ML))

res = len(common_member(M,LL))
if(res == 1):
    print("No")
elif (res >= (N/2)):
    print("Yes")
# Judge status: Accepted
w, h, n = map(int, input().split())
lis = []
for i in range(n):
  lis.append(list(map(int, input().split())))
x=0
y=0

for i in lis:
  if i[2] == 1:
    if x < i[0]:
      x=i[0]
  elif i[2] == 2:
    if i[0] < w:
      w=i[0]
  elif i[2] == 3:
    if y < i[1]:
      y=i[1]
  else:
    if i[1] < h:
      h=i[1]
x_a = w-x
y_a= h-y
if x_a < 0 or y_a < 0:
  print(0)
  exit()
print(x_a*y_a)
# Judge status: Accepted
def main():
    n, m = map(int, input().split())
    x, y = min(n, m), max(n, m)
    if x == 1 and y == 1:
        ans = 1
    elif x == 1:
        ans = y - 2
    else:
        ans = (x - 2) * (y - 2)
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Accepted
k = int(input())
now = 7%k
if now == 0:
    print(1)
    exit()
ans = 1
for i in range(k+1):
    ans += 1
    now *= 10
    now += 7
    now %= k
    if now == 0:
        break
if now == 0:
    print(ans)
else:
    print(-1)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
A = 0
B = 0
for i in range(n):
    A += max(0, (b[i] - a[i]) // 2)
    B += max(0, a[i] - b[i])
if sum(b) >= sum(a):
    if A >= B:
        print("Yes")
        exit()
print("No")
# Judge status: Accepted
w, h, n = map(int, input().split())
xa = 0
xb = w
ya = 0
yb = h
for _ in range(n):
    x, y, a = map(int, input().split())
    if a == 1:
        xa = max(x, xa)
    if a == 2:
        xb = min(x, xb)
    if a == 3:
        ya = max(y, ya)
    if a == 4:
        yb = min(y, yb)
        
print(max(max(xb - xa, 0) * max(yb - ya, 0), 0))
# Judge status: Accepted
from decimal import Decimal
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    L = input()

    l = Decimal(L) / Decimal('3')
    ans = Decimal(l) ** Decimal('3')
    print(ans)


main()
# Judge status: Wrong Answer
n, s = map(int, input().split())
cnt=0
for i in range(n+1):
  for j in range(n+1):
    S = s-i-j
    if S<=n:
      cnt+=1
print(cnt)
# Judge status: Accepted
import bisect
from collections import defaultdict
N = int(input())
A = sorted(list(map(int, input().split())))
B = sorted(list(map(int, input().split())))
C = sorted(list(map(int, input().split())))

ans = 0
bb = []
for b in B:
  idx = bisect.bisect_right(C, b)
  bb += [[b, len(C)-idx]]

for i in range(len(bb)-1, 0, -1):
  bb[i-1][1] += bb[i][1]

for a in A:
  idx = bisect.bisect_right(B, a)
  if idx > len(B)-1:
    continue
  ans += bb[idx][1]
print(ans)
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
lis = list(input())
lis.sort()
for i in range(N-1):
    string = list(input())
    nx = []
    for l in lis:
        if l in string:
            nx.append(l)
            string.remove(l)
    lis = nx
lis.sort()
print(''.join(lis))
# Judge status: Accepted
N, H = map(int, input().split())
A = [0]*N
B = [0]*N
for i in range(N):
    A[i], B[i] = map(int, input().split())
a = max(A)
B.sort()
ans = 0
while len(B) > 0 and B[-1] >= a and H > 0:
    H -= B.pop()
    ans += 1
    if H <= 0:
        print(ans)
        exit()
print(ans+(-(-H//a)))
# Judge status: Accepted
D , T , S = map(int,input().split())
if(D/S <= T):
  print("Yes")
else:
  print("No")
# Judge status: Accepted
c=input()

if ((c=="a")or(c=="e")or(c=="i")or(c=="o")or(c=="u")):
    print("vowel")
else:
    print("consonant")
# Judge status: Wrong Answer
a,b,c = map(int,input().split())
print ("Yes") if a <= c <= b else print ("No")
# Judge status: Wrong Answer
a, b, c = input().split()
num = int(str(a + b + c))
if type(num/4) == 'int':
    print('YES')
else:
    print('NO')
# Judge status: Accepted
H = int(input())
count = 0
i = 0
while True:
  if H == 1:
    count += 2**i
    break
  else:
    H = H//2
    count += 2**i
    i += 1
    continue
print(count)
# Judge status: Wrong Answer
from operator import itemgetter
N = int(input())
AB = []
for _ in range(N):
    A, B = map(int, input().split())
    AB.append([B-A, A, B])
AB.sort(key=itemgetter(0))
cnt = 0
for _, a, b in AB:
    cnt += a
    if cnt > b:
        print("No")
        exit()
print("Yes")
# Judge status: Wrong Answer
a,b,c = map(int, input().split())
print(['No', 'Yes'][a<c and c<b])
# Judge status: Accepted
n = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
ans = 0
cnt = 0
for i in a:
    if i==0:
        ans += cnt//2
        cnt = 0
    else:
        cnt += i
ans += cnt//2
print(ans)
# Judge status: Accepted
n = int(input())

a = list(map(int, input().split()))
b = set(a)

print('YES' if len(a) == len(b) else 'NO')
# Judge status: Wrong Answer
a,b =map(int, input().split())
if max(a,b) > 9:
  print(':(')
else:
  print('Yay!')
# Judge status: Accepted

s = sorted(input())
t = sorted(input(),reverse=True)

if s < t:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
A=eval(input().replace('.','').replace(' ','*'))
print(int(A/100))
# Judge status: Wrong Answer
import math
import sys
n = int(input())
t = [int(input()) for _ in range(n)]
if n == 1:
  print(t[0])
  sys.exit()
elif n == 2:
  print((t[0]*t[1])//(math.gcd(t[0],t[1])))
  sys.exit()
t.sort()
ans = (t[0]*t[1])//math.gcd(t[0],t[1])
for i in range(2,n-3):
    #print((ans*t[i])//math.gcd(ans,t[i]))
    ans =((t[i]*ans)//math.gcd(t[i],ans))
print((ans*t[-1])//math.gcd(ans,t[-1]))
# Judge status: Accepted
N = int(input())
ac, re, wa, tle = 0,0,0,0
for i in range(N):
  line = input()
  if line == "AC":
    ac += 1
  elif line == "TLE":
    tle += 1
  elif line == "WA":
    wa += 1
  elif line == "RE":
    re += 1
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))
# Judge status: Accepted
a = input()
b = input()
 
if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
N = int(input())
L = input().split()
max = 0
count = 0

for i in range(N):
  count += int(L[i])
  if max < int(L[i]):
    max = int(L[i])
    
if count > 2*max:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
x = int(input())
for i in range(x,100004):
    if all([i%p!=0 for p in range(2,i)]):
        print(i)
        break
# Judge status: Accepted
X = int(input())
print(10-X//200)
# Judge status: Wrong Answer
def main():
    N = [int(x) for x in input()]
    dp0 = 0
    dp1 = 1
    for n in N:
        # そのまま払う
        a = min(dp0 + n, dp1 + 10 - n)
        # 1多めに払う
        b = min(dp0 + n + 1, dp1 + 10 - (n+1))
        dp0, dp1 = a, b
        print(n, dp0, dp1)
    print(dp0)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))

res = 0
for i in range(n-2):
  b = a[i:i+3]
  b.sort(reverse=True)
  if b[0] < b[1] + b[2]:
    res += 1
print(res)
# Judge status: Accepted
N, C, K = map(int, input().split())
T = [0]*N
cnt = 1
bus = 1
for i in range(N):
    T[i] = int(input())
T.sort()
tmp = T[0]+K
for i in range(1, N):
    if(cnt == 0):
        bus += 1
        cnt = 1
        tmp = T[i]+K
        continue
        
    if(T[i] <= tmp and cnt < C):
        cnt += 1
        if(cnt == C):
            cnt = 0
    else:
        cnt = 1
        bus += 1
        tmp = T[i]+K
print(bus)
# Judge status: Wrong Answer
s=input()

if s == 'Sunny':
  print('Cloudy')
elif s == 'Cloudy':
  print('Rainy')
else:
  print('Rainy')
# Judge status: Accepted
s = input()
a = [0,0]
res = 0
for i in range(len(s)):
  if s[i] == '0':
    a[0] += 1
  elif s[i] == '1':
    a[1] += 1
  if a[0] >= 1 and a[1] >= 1:
    res += 2
    a[0] -= 1
    a[1] -= 1
print(res)
# Judge status: Accepted
from math import gcd
K=int(input())
s=0
for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            s+=gcd(gcd(i,j),k)
print(s)
# Judge status: Wrong Answer
S = int(input())
v = 10**9
print(v, -1, 0, 0, S%v, S//v)
# Judge status: Wrong Answer
N = int(input())
S = [None]*N
P = [None]*N

for i in range(N):
    S[i], P[i] = input().split()

I = [j+1 for j in range(N)]

x = [(s, p, i) for s, p, i in zip(S, P, I)]

x.sort(key=lambda x:x[1], reverse=True)
x.sort(key=lambda x:x[0], reverse=False)

for s, p, i in x:
    print(i)
# Judge status: Accepted
a,b,c=map(int,input().split())
m=b//a
print(min(m,c))
# Judge status: Accepted
S,W = map(int,input().split())

if S<=W:
  print("unsafe")
else:
  print("safe")
# Judge status: Accepted
a=[0,0,0]
a[0],a[1],a[2]=map(int,input().split())
k=int(input())
a=sorted(a)
a[2]=a[2]*(2**k)
print(sum(a))
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline

n = int(input())
*a, = map(int, input().split())

if len(set(a)) == n:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

x=II()
print(10-x//200)
# Judge status: Accepted
N = int(input())
c = input()

num_r = 0
for i in range(N) :
  if c[i] == 'R' :
    num_r += 1
    
ans = 0
for i in range(num_r, N) :
  if c[i] == 'R' :
    ans += 1
    
print(ans)
# Judge status: Accepted
a,b,k = map(int, input().split())
ans = 0
for i in range(100):
    if a%(100-i)==0 and b%(100-i)==0:
        k -= 1
    if k==0:
        ans = 100-i
        print(ans)
        break
# Judge status: Wrong Answer
import math
from functools import reduce
import itertools

def solve():
    n = int(input())
    p = 1
    for i in range(1,n+1):
        p *= i
    print(p)
    return 0

if __name__ == "__main__":
    solve()
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    s = set(list(input()))
    if len(s) == 1: 
        print('No')
    else:
        print('Yes')


if __name__ == '__main__':
    solve()
# Judge status: Wrong Answer
N,K = map (int, input ().split ())
a = input ()
a = a.replace(a[K-1], '')
print (a)
# Judge status: Accepted
N, K, S = map(int,input().split())
 
n = [278]*N
for i in range(K):
  n[i] = S
for i in range(N):
	print(n[i],end=' ')
# Judge status: Wrong Answer
card    = list(map(int, input().split()))
count  = card[3] - card[0] - (card[1])
answer = card[0]

if count <= 0:
    print(answer)
else:
    count -= card[2]
    answer -= count * -1
    print(answer)
# Judge status: Accepted
s=input()
t=input()

count_max = 0
for i in range(0, len(s)-len(t)+1):
    count_tmp = 0
    for j in range(len(t)):
        if s[i+j]==t[j]:
            count_tmp += 1
    if count_max < count_tmp:
        count_max = count_tmp

print(len(t)-count_max)
# Judge status: Wrong Answer
d, t, s = map(int, input().split())
if d//s > t:
    print("No")
else:
    print("Yes")
# Judge status: Wrong Answer
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

a,b,x = I()
ca = a//x
cb = b//x
ans += cb-ca
if b % x == 0:
    ans += 1
print(ans)
# Judge status: Accepted
N = int(input())
D = list(map(int, input().split()))

mod = 998244353

from collections import Counter, deque

def solve(N,D):
    if D[0]!=0:
        return 0
    c = Counter(D)
    if c[0]>1:
        return 0
    ans = 1
    m = max(D)
    for i in range(1,m):
        # if c[i]==0:
        #     ans = 0
        #     continue
        ans *= pow(c[i],c[i+1],mod)
        ans %= mod
    return ans

print(solve(N,D))
# Judge status: Accepted
k,n=map(int,input().split())
a=list(map(int,input().split()))
ans=0
for i in range(n-1):
  ans=max(a[i+1]-a[i],ans)
ans=max(ans,k-a[-1]+a[0])
print(k-ans)