peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
def main():
    d, t, s = map(int, input().split())
    if d/s <= t:
        return "Yes"
    else:
        return "No"


if __name__ == "__main__":
    print(main())
# Judge status: Accepted
r,g,b = map(int,input().split())
print("YES" if (10*g+b)%4==0 else "NO" )
# Judge status: Accepted
from sys import stdin

S = list(input())
ans = 0
for i in range(len(S)//2):
    if S[i] != S[-i-1]:
        ans += 1
print(ans)
# Judge status: Accepted
k=int(input())
a,b=map(int,input().split())
c=b//k
if a<=k*c:
    print("OK")
else:
    print("NG")
# Judge status: Wrong Answer
a, b = input().split()
c = int(a+b)
for i in range(3333):
    if c == i**2:
        print("YES")
        exit()
print("NO")
# Judge status: Accepted
n = int(input())
A = []
bool = [True] * n
for i in range(n):
    a = int(input())
    a -= 1
    A.append(a)
j = A[0]
cnt = 1
for i in range(n):
    if j == 1:
        print(cnt)
        exit()
    if bool[A[j]] == True:
        bool[A[j]] = False        
        j = A[j]
        cnt += 1
    else :
        print(-1)
        exit()
# Judge status: Wrong Answer
a,b = map(int,input().split())

print(min(a,b))
# Judge status: Accepted
a, b, c, d = (int(x) for x in input().split())

while 1:
    c -= b
    if c <= 0:
        print('Yes')
        exit()
    a -= d
    if a <= 0:
        print('No')
        exit()
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
cnt=1
if n==1:
    print(*a)
    exit()
from collections import deque
ans=deque(str(a[0]))
for i in range(1,n):
    cnt+=1
    if cnt%2==0:
        ans.appendleft(str(a[i]))
    else:
        ans.append(str(a[i]))

if cnt%2==0:
    print(" ".join(list(ans)))
else:
    print(" ".join(reversed(list(ans))))
# Judge status: Wrong Answer
def main():
    x,y = list(map(int, input().split()))

    if y == 0:
        print(x)
        exit()
    nums = list(map(int, input().split()))
    ans = 101
    for i in range(1, 101):
        if i not in nums:
            ans = ans if abs(ans-x) <= abs(i-x) else i
    print(ans)



if __name__ == '__main__':
    main()
# Judge status: Accepted
s=input()
for i in range(3):
    if s[i]==s[i+1]:
        print("Bad")
        exit()
print("Good")
# Judge status: Wrong Answer
import math
a, b = input().split()
c=int(a)
d=float(b)
print(math.floor(c*d))
# Judge status: Accepted
N = int( input() )
A = [int(x) for x in input().split()]

if( N == len( list(set(A)) ) ):
    print( 'YES' )
else:
    print( 'NO' )
# Judge status: Wrong Answer
n = int(input())
if n < 4:
    print("No")
    
elif (n%4==0)|(n%7==0)|((n-4)%7==0)|((n-7)%4==0):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
N,M = map(int,input().split())
A = []
B = []
count = M
ans = 0
for i in range(N):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)
C = sorted(A)

for i in range(N):
    min_a = C[0]
    min_index = A.index(min_a)
    min_B = B[min_index]
    if count <= 0:
        break
    if min_B <= count:
        ans += min_B*min_a
        count -= min_B
    else:
        ans += min_a*count
        count = 0
    C.pop(0)
print(ans)
# Judge status: Accepted
from collections import Counter
from functools import reduce
from operator import mul


def ncr(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


N, P = list(map(int, input().split()))
A = Counter(list(map(lambda x: int(x) % 2, input().split())))
ans = 2 ** A[0]
if P:
    print(ans * sum(ncr(A[1], i) for i in range(1, A[1] + 1, 2)))
else:
    print(ans * sum(ncr(A[1], i) for i in range(0, A[1] + 1, 2)))
# Judge status: Accepted
x = int(input())

t = 0
while(True):
    if (t*(t+1)) / 2 >= x:
        break
    else:
        t += 1

print(t)
# Judge status: Accepted
a,b,c=map(int,input().split())
l=[a,b,c]
l.sort()
cnt=l[2]-l[1]
sa=l[2]-(l[0]+cnt)
cnt+=sa//2
if sa%2!=0:
  cnt+=2
print(cnt)
# Judge status: Wrong Answer
X=list(map(str,input()))
t=0
s=0
i=0
h=len(X)//2
#print(h)
while t!=h:
  if X[i]=="T":
    t=t+1
    i=i+1
    #print("t",t)
  else:
    s=s+1
    i=i+1
    #print("s",s)
print(len(X)-s*2)
# Judge status: Accepted
def main():
  N, K = input().split()
  N = int(N)
  K = int(K)

  s = set()

  for k in range(K):
    d = int(input())
    A = input().split()
    for i in range(d):
      s.add(A[i])
  
  print(N - len(s))



if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
from fractions import gcd
n = int(input())

def lcm_base(x,y):
  return x*y/gcd(x,y)

ans =1
for i in range(n):
  a = int(input())
  ans = lcm_base(ans,a)
print(int(ans))
# Judge status: Wrong Answer

N = input("How many books?\n")
N = int(N)
N1= N % 10
num = {2:"hon",4:"hon",5:"hon",7:"hon",9:"hon",\
        0:"pon",1:"pon",6:"pon",8:"pon",\
        3:"bon"}
if N in num:
    val = num[N]
    print(val)
else:
    print("エラー")
# Judge status: Accepted
s=input()
t=input()
print('Yes' if s==t[:-1] else 'No')
# Judge status: Wrong Answer
s = list(input())
n = len(s)
k = int(input())
t = [ord(s[i]) - 97 for i in range(n)]
for i in range(n):
    if k == 0:
        break
    x = 26 - t[i]
    if 0 < x % 26 <= k:
        k -= x
        s[i] = "a"
if k > 0:
    s[-1] = chr((k + t[-1]) % 26 + 97)
print("".join(s))
# Judge status: Wrong Answer
li = list(input())

if li[0] != li[1] and li[1] != li[2] and li[2] != li[0]:
    print('Yes')
else:
    print('Yes')
# Judge status: Wrong Answer
from itertools import permutations
from math import sqrt, pow, factorial

n = int(input())
xy = [list(map(int, input().split())) for _ in range(n)]

sum = 0

def calc(a, b):
    [x1, y1] = a
    [x2, y2] = b
    return sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2))



for i in permutations(range(n)):
    distance = 0
    for j in range(1, n):
        distance = calc(xy[i[j]], xy[i[j-1]])
    sum += distance
print(sum / factorial(n))
# Judge status: Accepted
def main():
    S = list(input())
    for i in range(1, len(S)-1):
        sub_str = S[:len(S)-i]
        if len(sub_str) % 2 == 1:
            continue
        elif sub_str[:int(len(sub_str)/2)] == sub_str[int(len(sub_str)/2):]:
            print(len(sub_str))
            break

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N,M=map(int,input().split())
A=[]
B=[]
for i in range(N):
    A.append(input())
for i in range(M):
    B.append(input())

for i in range(N-M+1):
    for j in range(N-M+1):
        f=True
        for k in range(M):
            if A[i+k][i:M+i]==B[k]:continue
            else:
                f=False
                break
        if f:
            print("Yes")
            exit()
print("No")
# Judge status: Accepted
x = int(input())
if x <= 599:
    print(8)
elif x <= 799:
    print(7)
elif x <= 999:
    print(6)
elif x <= 1199:
    print(5)
elif x <= 1399:
    print(4)
elif x <= 1599:
    print(3)
elif x <= 1799:
    print(2)
elif x <= 1999:
    print(1)
# Judge status: Wrong Answer
A, B, C = map(int, input().split())
K = int(input())

for _ in range(K):
    if A > B:
        B *= 2
    elif B > C:
        C *= 2
    else:
        A *= 2

if A < B < C:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
x = int(input())
n = x//100
x -= n*100
if 5*n >= x:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
S = input()
f = int(S[:2])
s = int(S[2:])

if 1 <= f <= 12 and 1 <= s <= 12:
    print("AMBIGUOUS")
elif 1 <= f <= 12:
    print("MMYY")
elif 1 <= s <= 12:
    print("YYMM")
else:
    print("NA")
# Judge status: Accepted
n=int(input())
l1=list(map(int,input().split()))

if(len(l1)==len(set(l1))):
    print("YES")
else:
    print("NO")
# Judge status: Accepted
N=int(input())

ans=0
for i in range(1,N+1):
  if len(str(i))%2!=0:
    ans+=1
print(ans)
# Judge status: Accepted
c1=input()
c2=input()
if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n, k = map(int, input().split())
if n % k:
    print(1)
else:
    print(0)
# Judge status: Wrong Answer
a_lines = []
b_lines = []
N, M = tuple(map(int, input().split()))
for _ in range(N):
    a_lines.append(input())
for _ in range(M):
    b_lines.append(input())

a_idx = 0
final_ok = False
while a_idx + len(b_lines) <= len(a_lines)-1:
    ok = True
    for b_line in b_lines:
        if b_line not in a_lines[a_idx]:
            ok = False
            break
    if ok:
        final_ok = True
        break
    a_idx += 1

if final_ok:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
s = input().split('S')

ans = 0

for i in s:
  if len(i) > ans:
    ans = len(i)
    
print(ans)
# Judge status: Accepted
def resolve():
    '''
    code here
    '''
    N, M, K = [int(item) for item in input().split()]
    
    is_found = False
    for i in range(N+1):
        for j in range(M+1):
            if i*M + j*N -2*j*i == K:
                is_found = True
                break
    print('Yes') if is_found else print('No')

if __name__ == "__main__":
    resolve()
# Judge status: Accepted
H,A = map(int, input().split())
t = 0

if H <= A:
    # print(str(t) + 'の攻撃で、〇〇は倒れた')
    print(1)
else:
    while H > 0:
        H -= A
        t += 1
        # print('◆◆の攻撃' + str(A) + 'のダメージ' + '、〇〇の残り体力' + str(H))
    else:
        # print(str(t) + '回の攻撃で、〇〇は倒れた')
        print(t)
# Judge status: Accepted
import math

n = int(input())

t = int(math.sqrt(n))

ans = 0

for i in reversed(range(t+1)):
    if n % i == 0:
        ans = n//i+i
        break
        
print(ans-2)
# Judge status: Accepted
N = int(input())
H = list(map(int, input().split()))
max_h = H[0]
flag = 0

for i in range(1, N):
    max_h = max(max_h, H[i])
    if max_h - H[i] > 1:
        flag += 1

if flag:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
def com(n,r,m):
 f=[1,1]
 for i in range(2,n+1):
  f.append(f[i-1]*i%m)
 return f[n]*pow(f[r]*f[n-r]%m,m-2,m)%m
 
mod=10**9+7
x,y=map(int,input().split())
z=(x+y)//3
if (x+y)%3 or abs(x-y)>z:
 ans=0
else:
    ans=com(z,x-z,mod)
print(ans)
# Judge status: Accepted
a, b, k = map(int, input().split())

upper = min(a + k, b)
bottom = max(b - k + 1, upper)

for i in range(a, upper):
    print(i)
for j in range(bottom, b + 1):
    print(j)
# Judge status: Accepted
n,l=map(int,input().split());print(*sorted([input() for _ in range(n)]),sep='')
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
def dist(x):
  ret = 0
  for i in A:
    ret+=(x-i)**2
  return ret
ans = dist(100)
for X in range(-100,100):
  ans=min(ans,dist(X))
print(ans)
# Judge status: Wrong Answer
n,m = map(int, input().split())
a = map(int, input().split())
print(n-sum(a))
-1 if n < sum(a)  else n-sum(a)
# Judge status: Accepted
n,m=map(int,input().split())
a=list(map(int,input().split()))
def func(n):
  ret=0
  n=n/2
  while n.is_integer():
    ret+=1
    n=n/2
  return ret
b=func(a[0])
for i in range(1,n):
  if b==func(a[i]):
    continue
  else:
    print(0)
    exit(0)
from fractions import gcd
lcmn=a[0]//2
for i in range(1,n):
    lcmn=(lcmn*a[i]//2)//gcd(lcmn,a[i]//2)
print((1+m//lcmn)//2)
# Judge status: Wrong Answer
X, Y, Z = map(int, input().split())
print('{} {} {}'.format(Y, Z, X))
# Judge status: Accepted
X = int(input())
n = 100
A = 100
i = 0

while n < X:
    n = A*1.01
    A = int(n)
    i += 1
    if A >= X:
        print(i)
        break
# Judge status: Accepted
A, B, C = map(int, input().split(' '))

print(min(C, B // A))
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
counter = 1 ###グループ数
sign = 0 ###増減、-1,0,1、0はグループの初回、または初回以降増減が見られないときのみ
for x in range (1,N):
	if A[x]>A[x-1] and (sign==0 or sign==1):
		sign = 1
	elif A[x]>A[x-1] and (sign==-1):
		counter += 1
		sign = 0
	elif A[x]<A[x-1] and (sign==0 or sign==-1):
		sign = -1
	elif A[x]<A[x-1] and (sign==1):
		counter += 1
		sign = 0
print(counter)
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
X = A[0]
for a in A[1:]:
    X = X ^ a
for i in range(n):
    A[i] = str(X ^ A[i])
print(" ".join(A))
# Judge status: Accepted
k, s = map(int, input().split())
ans = 0
for x in range(k+1):
    if x > s:
        break
    else:
        for y in range(k+1):
            if x+y > s:
                break
            elif s - x - y <= k:
                ans += 1
print(ans)
# Judge status: Accepted
n,m = map(int, input().split())
print((n*(n-1) + m*(m-1)) // 2)
# Judge status: Accepted
import random

N = int(input())

for i in range(N):
    print(random.randint(1, 26))
# Judge status: Accepted
s=input()
if s[len(s)-1]=="s":
    s+="es"
else:
    s+="s"
print(s)
# Judge status: Wrong Answer
N = int(input())
a= list(map(int,input().split()))
b= list(map(int,input().split()))
a.sort()
b.sort()
#print(a)
#print(b)

if sum(a)>sum(b):
  print("No")
else:
  kachi = [a[i]-b[i] if(a[i]>b[i]) else 0 for i in range(N)]  
  make = [b[i]-a[i] if(b[i]>a[i]) else 0 for i in range(N)]  
  #print("kachi",kachi)
  #print("make",make)
  #print(sum(a))
  #print(sum(b))
  if sum(kachi)>0:
    print("No")
  else:
    print("Yes")
# Judge status: Accepted

K = int(input())
cur = 7
for n in range(K):
    if cur % K != 0:
        cur = (cur * 10 + 7) % K
    else:
        print(n + 1)
        break
else:
    print(-1)
# Judge status: Accepted
N, R = map( int, input().split() )

if N >= 10:
  print( R )
else:
  print( R + 100 * ( 10 - N ) )
# Judge status: Accepted
S0 = input()
S1 = input()

ans = "YES"
for i in range(3):
    if S0[i] != S1[2-i]:
        ans ="NO"
        break

print(ans)
# Judge status: Accepted
n = int(input())
s = input()
x = 0
result = x
for c in s:
    if c == "I":
        x += 1
    else:
        x -= 1
    result = max(result, x)
print(result)
# Judge status: Wrong Answer
N=int(input())
for i in range(7):
  k= 2**i
  if k > N:
    break
print(k//2)
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

ans = a - b
ans = c - ans

print(ans)
# Judge status: Wrong Answer
n = int(input())
max_x = max_y = 0
min_x = min_y = 10**9
for i in range(n):
    X, Y = map(int, input().split())
    x = X + Y
    y = X - Y
    max_x = max(max_x, x)
    max_y = max(max_y, y)
    min_x = min(min_x, x)
    min_y = min(min_y, y)
print(max(max_x - min_x, max_y - min_y))
# Judge status: Accepted
a, b = map(int, input().split())
if a*b % 2 == 0:
    out = "Even"
else:
    out = "Odd"

print("{}".format(out))
# Judge status: Accepted
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
a,b = map(int, input().split())
r = 0
if a < b:
  r = b
  b = b - 1
else:
  r = a
  a = a - 1
r = r + max(a, b)
print(r)
# Judge status: Wrong Answer
N=int(input())
print(int(N*(N-1)/2))
# Judge status: Accepted
N = input()
A = [int(t)-1 for t in raw_input().split()]
B = map(int, raw_input().split())
C = map(int, raw_input().split())

ans = 0
for i in range(N):
  ans += B[A[i]]
  if i>0 and A[i]==A[i-1]+1:
    ans += C[A[i-1]]
print ans
# Judge status: Wrong Answer
def main():
    x, y = list(map(int, input().split()))
    ans = abs(y) - abs(x)
    if x >= 0 and y >= 0 or x < 0 and y < 0:
        if x > y:
            print(x - y + 2)
        else:
            print(y - x)
    elif x < 0 and y >= 0:
        print(min(y - x, abs(y - abs(x)) + 1))
    elif x >= 0 and y < 0:
        print(min(x - y, abs(x - abs(y)) + 1))


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
import itertools as it

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

N = int(input())
L = li()

# 組み合わせ列挙
c = it.combinations(L, 3)
c_list = list(c)

cnt = 0
for l in c_list:
    unique_l = len(set(l))
    if unique_l != 3:
        continue
    sum_l = l[0] + l[1] + l[2]
    max_l = max(l)
    sum_lest = sum_l - max_l
    if sum_lest > max_l:
        print(l)
        cnt += 1

print(cnt)
# Judge status: Accepted
import string
s = input()
lis = string.ascii_lowercase
for i in range(len(lis)):
    if lis[i] == s:
        print(lis[i+1])
# Judge status: Wrong Answer
n,m = map(int, input().split())
x = sorted(list(map(int, input().split())))

nums = [0]*(m-1)
for i in range(m-1): nums[i] = x[i+1] - x[i]
nums = sorted(nums)
print(sum(nums[:m-1-(n-1)]))
# Judge status: Accepted
n=int(input())
dic={}
for i in range(n):
    v=int(input())
    dic[v]=dic.get(v,0)+1
count=0

for k in dic.keys():
    if dic[k]%2!=0:
        count+=1
print(count)
# Judge status: Accepted
x=int(input())
prime=0
tmp=x
while prime==0:
  flag=True
  for i in range(2,int(tmp*0.5)+1):
    if tmp%i==0:
      flag=False
      break
  if flag:
    prime=tmp
  tmp+=1
print(prime)
# Judge status: Accepted
N = int(input())
H = list(map(int, input().split()))
for i in range(0, N-1):
    if H[N-i-2]-1 == H[N-i-1]:
        H[N-i-2] = H[N-i-2]-1
    elif H[N-i-2]-1 > H[N-i-1]:
        print ("No")
        break
else:
    print ("Yes")
# Judge status: Wrong Answer
if __name__ == '__main__':
    b, c = map(int, input().split())
    a = int(str(b)+str(c))

    for i in range(2,101):
        if a <  i* i:
            print("No")
            break
        elif a == (i * i) :
            print("Yes")
            break
# Judge status: Wrong Answer
s = list(input())
s.sort()
a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'r', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in a:
    if i not in s:
        print(i)
        exit()
print('None')
# Judge status: Wrong Answer
s, w = map(int, input().split())

if  w > s:
  print("unsafe")
else:
  print("safe")
# Judge status: Accepted
import sys
from collections import Counter

N = int(sys.stdin.readline().rstrip())
As = list(map(int, sys.stdin.readline().rstrip().split()))

ll = [0] * N
lr = [0] * N
for i, a in enumerate(As):
    ll[i] = i + a
    lr[i] = i - a

cl = Counter(ll)
cr = Counter(lr)

ans = 0
for l in cl.keys():
    ans += cl[l] * cr[l]

print(ans)
# Judge status: Accepted
N = input()
l = len(N)
f9 = True

def digitsum(s):
    result = 0
    S = str(s)
    for d in S:
        result += int(d)

    return result

for i in range(0,8):
    if (str(i) in N[1:l]):
        f9 = False

if (f9):
    print(digitsum(N))
else:
    tmp = str((int(N[0])-1)) + "9"*(l-1)
    print(digitsum(tmp))
# Judge status: Accepted
s = list(input())
K = int(input())

"""
Kを使用する
-> aにすることができる

残りのKはs[-1]に使用
"""

from collections import defaultdict
alpha = defaultdict(int)
for i in range(97, 97 + 26):
    alpha[chr(i)] = i - 97

for i in range(len(s)):
    if s[i] == "a":
        continue
    if 26 - alpha[s[i]] <= K:
        K -= 26 - alpha[s[i]]
        s[i] = "a"

if K > 0:
    s[-1] = chr(97 + (alpha[s[-1]] + K) % 26)

print(*s, sep="")
# Judge status: Accepted
X, N = map(int, input().split())
p = list(map(int, input().split()))

i = 0
while True:
    if X - i not in p:
        print(X - i)
        break
    elif X + i not in p:
        print(X + i)
        break
    i += 1
# Judge status: Accepted
a, b = map(int, open(0).read().split())

if a > 0:
    print('Positive')
elif a == 0 or b == 0:
    print('Zero')
elif a < 0 and b > 0:
    print('Zero')
elif (b-a)%2 == 1:
    print('Positive')
else:
    print('Negative')
# Judge status: Accepted
s = input()
cnt = 1
now = s[0]
tmp = ''
for s in s[1:]:
    tmp += s
    if now == tmp:
        continue
    else:
        cnt+=1
        now = tmp
        tmp = ''
print(cnt)
# Judge status: Accepted
#ABC046 A
s = set(map(int,input().split()))

print(len(s))
# Judge status: Wrong Answer
A,B=map(int,input().split())
S=input()
a='Yes'
for i in range(A+B+1):
  if i!=A:
    if S[i]!='-':
      a='No'
  else:
    if S[i]=='-':
      a='No'
print(a)
# Judge status: Wrong Answer
n=int(input())
ans=[]
num2alpha = lambda c: chr(c+64).lower()
while True:
  if num2alpha(n%26)=='@':
    ans.append('z')
  else:
    ans.append(num2alpha(n%26))
  n=n//26
  if n==0:
    break
for i in range(len(ans)):
  print(ans[-1-i], end='')
print()
# Judge status: Wrong Answer
import numpy as np

N,K,Q = map(int, input().split())
A = [K] * N

A_np = np.array(A)

for i in range(Q):
	a = int(input())
	A_np -= 1
	A_np[a-1] += 1
	print(A_np)


for j in range(N):
	if A_np[j] > 0:
		print("Yes")
	else:
		print("No")
# Judge status: Accepted

n = int(input())
a = [int(x) for x in input().split()]

deta = [0] * (n+1)

for i in a:
    deta[i] += 1

ans = [0] * (n+1)

for j in range(n+1):
    if deta[j] > 1:
        ans[j] = deta[j]*(deta[j]-1)/2
    else :
        ans[j] = 0

add = sum(ans)

for k in a:
    print(int(add - deta[k]*(deta[k]-1)/2 + (deta[k]-1)*(deta[k]-2)/2))
# Judge status: Accepted
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

s, w = map(int, input().split())

if w>=s:
    print('unsafe')
else:
    print('safe')
# Judge status: Wrong Answer
n = int(input())
for i in range(0, 101, 4):
    if (n - i) % 7 == 0:
        print('Yes')
        exit()
print('No')
# Judge status: Wrong Answer
S=input()
a=S.count('0')
b=S.count('1')
print(min(a,b))
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

mod_four = len([i for i in A if i % 4 == 0])
odd_number = len([i for i in A if i % 2 == 1])

if mod_four >= odd_number:
    print("Yes")
elif mod_four + 1 == odd_number and N - mod_four - odd_number == 0:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
s = input()
cnt = 0
for i in range(len(s)):
    a0, a1 = s[i], s[-i-1]
    if a0 != a1:
        cnt += 1
print(cnt)
# Judge status: Accepted
n=int(input())
a=list(map(str,input().split()))
b,c=[],[]
if n%2==0:
    for i in range(n):
        if i%2==0:
            b.append(a[i])
        else:
            c.append(a[i])
    c.reverse()
else:
    for i in range(n):
        if i%2==1:
            b.append(a[i])
        else:
            c.append(a[i])
    c.reverse()
print(" ".join(c+b))
# Judge status: Accepted
import itertools
n=int(input())
p=tuple(map(int,input().split()))
q=tuple(map(int,input().split()))
per=list(itertools.permutations(range(1,n+1)))
a=0
b=0
for num,i in enumerate(per):
    if i==p: a=num+1
    if i==q: b=num+1
print(abs(a-b))
# Judge status: Accepted
N, M = map(int, input().split())
H = tuple(map(int, input().split()))
T = [set() for _ in range(N)]

for _ in range(M):
    a, b = map(int, input().split())
    T[a-1].add(H[b-1])
    T[b-1].add(H[a-1])

count = 0
for i, t in enumerate(T):
    if not t:
        count+=1
        continue
    else:
        h = H[i]
        if h > max(t):
            count += 1

print(count)
# Judge status: Accepted
n = int(input())
l = [int(entry) for entry in input().split()]


def check(a, b, c):
    return (a + b) > c and (b + c) > a and (a + c) > b


count = 0
for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            if l[i] != l[j] and l[j] != l[k] and l[k] != l[i]:
                if check(l[i], l[j], l[k]):
                    count += 1
print(count)
# Judge status: Wrong Answer
# max min
n, m, x, y = map(int, input().split())
xs = max(list(map(int, input().split())))
ys = min(list(map(int, input().split())))
print("No War" if xs < ys else "War")
# Judge status: Accepted
import sys
n = int(sys.stdin.readline().strip())

eroot_n = int(pow(n, 0.5))
res = 0
for num_a in range(1, eroot_n + 1):
    limit_b = int(n / num_a) + 1
    for num_b in range(num_a, limit_b):
        """
        print(num_a)
        print(num_b)
        print('\n')
        """
        if num_a * num_b >= n:
            continue
        if num_a == num_b:
            res = res + 1
        else:
            res = res + 2
print(res)
# Judge status: Accepted
x = list(input())
i=0
while True:
	if i==26:
		print('None')
		break
	if not chr(ord('a')+i) in x:
		print(chr(ord('a')+i))
		break
	i+=1
# Judge status: Wrong Answer
N = int(input())
A_list = list(map(int, input().split()))
B_list = list(map(int, input().split()))

A_list.reverse()
B_list.reverse()

killed_enemies = 0
killed_num = 0
for i in range(N):
    if killed_num + B_list[i] >= A_list[i]:
        killed_num = (killed_num + B_list[i]) - A_list[i]
        killed_enemies += A_list[i]

    else:
        killed_num = killed_num + B_list[i]
        killed_enemies += killed_num

if B_list[N-1] >= A_list[N]:
    killed_enemies += A_list[N]
else:
    killed_enemies += B_list[N-1]

print(killed_enemies)
# Judge status: Accepted
#!/usr/bin/env python3

N = int(input())
P = list(map(int, input().split()))

cnt = 0
for i in range(N-1):
    if i+1 == P[i]:
        p = P[i]
        P[i] = P[i+1]
        P[i+1] = p
        cnt += 1

if P[N-1] == N:
    cnt += 1

print(cnt)