peterverebics/CodeNet_Python_118 huggingface dataset:
import math
a,b,n=map(int,input().split())

def judge(x):
  if math.floor(a*x/b)-math.floor(a*(x-1)/b)>a*(math.floor(x/b)-math.floor(x-1/b)):
    return True 
  else:
    return False

def bi_re():
  l=1
  r=n
  
  while l<=r:
    m=(l+r)//2
    if judge(m):
      l=m+1
    else:
      r=m-1
  return m
c=bi_re()
#print(c)
print(math.floor(a*c/b)-a*math.floor(c/b))
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
#%%code
import random
def resolve():
    A,B,N=pin()
    def f(A,B,x):
        t=(A*x)//B
        s=x//B
        return t-A*s
    ans=0
    for i in range(10**6):
        k=random.randint(0,N)
        ans=max(ans,f(A,B,k))
    print(ans)
#%%submit!
resolve()
A,B,N = list(map(int, input().split()))
maxlist = []

def func(A, B, x):
  return (A*x)//B - A * (x//B)

if(N<10**8):
  for i in range(N+1)[::-1]:
    maxlist.append(func(A,B,i))
else:#N>10**8
  for i in range(N-10**6,N+1)[::-1]:
    maxlist.append(func(A,B,i))
  
print(max(maxlist))
a, b, n = map(int, input().split())

if n%b == 0 :
    print(a*(n-1)//b)
else:
    print(a*(n)//b - a*((n)//b))
a = list(map(int,input().split()))
A = a[0]
B = a[1]
N = a[2]
ans = 0
an = 0

if N<=10**6+1:
  for i in range(N+1):
    an = int(A*i/B)-A*int(i/B)
    if an >= ans:
      ans = an
    else:
      ans = ans
  print("a")
else:
  for i in range(N-10**6,N+1):
    an = int(A*i/B)-A*int(i/B)
    if an >= ans:
      ans = an
    else:
      ans = ans
  print("b")
print(N)
print(ans)
a,b,n=list(map(int,input().split()))
if n>=b and b>1:
    k=n%b
    if k==b-1:
        print(int(a*(n)/b)-a*int(n/b))
    else:
        print(int(a*(n-k-1)/b)-a*int(n/b-1))
else:
    print(int(a*n/b))
a,b,n = map(int,input().split())

print(a*n//b-a//b)
import math
a, b, n = input().split(" ", 3)
a = int(a)
b = int(b)
n = int(n)
if(n >= b):
    print(a-1)
if(n < b):
    print(math.floor(a*(n)/b)-a*math.floor(n/b))
A,B,N = map(int,input().split())
ans = []
if N < 15:
    for x in range(N+1):
        tmp = (A * x // B) - A * (x//B)
        ans.append(tmp)
        #print(tmp)
else:
    for x in range(N-1000,N+1):
        tmp = (A * x // B) - A * (x//B)
        ans.append(tmp)
        #print(tmp)
print(max(ans))
from math import floor

A,B,N=map(int,input().split())

ans=floor(min(A*N/B, A-1))
print(ans)
A,B,N=map(int,input().split())
s=[0]
for x in range(N):
  t=((A*x)//B)-A*(x//B)
  if t>=max(s):
    s.append(t)
print(max(s))
import math

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

m = math.floor(a*n/b)
c = 0
if n>=b:
    for x in range(b,n+1,b):
        c = math.floor(a*x/b)-a*math.floor(x/b)
        #print('b:',c)
        if c >= m:
            m=c
        else:
            break
print(m)
# coding: utf-8
# Your code here!

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

if(b==1):
    print(0)
    exit()

def check(x):
    return int(a*x/b)-a*int(x/b)
    
preans=0
for i in range(n,1,-1):
    ans=check(i)
    if(ans<preans):
        break
    preans=ans
print(preans)
import math

def f(A,B,x):
    return math.floor(A*x/B) - A*math.floor(x/B)

A,B,N = map(int,input().split())
ans = 0
if B <= N:
    N = B
for x in range(B//A , min(B-1,N)):
    n = f(A,B,x)
    if n > ans:
        ans = n

print(ans)
import math
A, B, N = map(int, input().split())
t = N // B
if N % B == 0:
    a = max(1, N-1)
    b = N
else:
    a = max(1, t * B - 1)
    b = N

k = A * N // B
if A * N % B == 0:
    case = [a, b, max(min(B-1,N),1)]
else:
    c = max(1,k*B//A)
    case = [a,b,c,max(min(B-1,N),1)]

ans = -10**9
for i in case:
    ans = max(ans,math.floor(A*i/B)-A*math.floor(i/B))

print(ans)
a, b, n = map(int, input().split())

max_num = -1
tmp = 0
for x in range(n+1):
  tmp = (x / b - x // b)
  if max_num > tmp:
    max_num = x - 1
    break

if (max_num == -1):
  max_num = n
  
print(int(a * max_num / b // 1 - a * (max_num / b // 1)))
import random
a,b,n=map(int,input().split())
def f(x):
    return int(a*x/b)-a*int(x/b)
if n<b:
    ans =f(n)
else:
    t = n
    u = b - 1
    ans=max(f(t),f(u))
print(ans)
a,b,n=map(int,input().split())
x=b-1
i=0
if a==1:
  print('0')
while True:
  if i/a>=1/b:
    break
  i+=1
if a>=b:
  print(a-i)
else:
  print(a-i-2)
import math

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

x = 1
k = 1/b
f = math.floor(a*k) - math.floor(k)*a
ans = 0
N = [x for x in range(1,n+1) if a*(x/b - int(x/b))>1]

for x in N:
  if ans<f:
    ans = f
  k = x/b
  f = math.floor(a*k) - math.floor(k)*a
  
print(ans)
A, B, N = map(int, input().split())

if N > B:
    print(int(A * (B - 1) / B))
else:
    print(int(A * N / B))
def nibutan(minval,maxval) :
    if maxval-minval<3 :
        return minval;
    elif (func(minval)-func((minval)//2+1))*(func((minval+maxval)//2+1)-func((minval+maxval)//2))<=0 :
        return nibutan(minval,(minval+maxval)//2);
    else :
        return nibutan((minval+maxval)//2,maxval);


def func(x) :
    global a,b;
    return (a*x)//b-a*(x//b);

a,b,n = list(map(int,input().split()));
ans = nibutan(1,n);
print(max(func(ans),func(ans+1),func(ans+2)));
A, B, N = list(map(int, input().split()))

if B==1:
  print(0)

tb = B - 1
tp_pre = 0
while(True):
  tp = (A*tb)//B - A*(tb//B)
  if tp > tp_pre:
    tp_pre = tp
  tb += B
  if tb > N:
    break

if (B > N):
  print((A*N)//B - A*(N//B))
else:
  print(int(tp_pre))
a,b,n=map(int,input().split())
if b>=n:
	l=a*n//b
elif b<n:
  l=-10000
  for i in (b,n):
    d=a*i//b-a*(i//b)
    if d>l:
      l=d
print(l)
A,B,N = map(int,input().split())
S = 0
for i in range(B):
    S = max(S,(A*i)//B - A * (i//B))
print(S)
import math
A,B,N = (int(x) for x in input().split())
a = (N//B)*B-1
if a < 0:
  ans = math.floor(A*N/B) - A*math.floor(N/B)
else:
  if N%B >= a:
    ans = math.floor(A*a/B) - A*math.floor(a/B)
  else:
    ans = math.floor(A*(N%B)/B) - A*math.floor((N%B)/B)
print(ans)
import sys
input = sys.stdin.readline
import random
import copy
import math
def main():
     A,B,N = map(int,input().split())
     x = min(B,N)-0.000000000000001
     ma = math.floor(A*x/B)-A*math.floor(x/B)
     print(ma)
                    
main()
A, B, N = [int(i) for i in input().split()]

def f(x: int) -> int:
    return (A * x) // B - A * (x // B)

res = 0
for x in range(N, 0, -1):
    tmp = f(x)
    if res < tmp:
        res = tmp
    elif res > tmp:
        print(res)
        break
    else:
        pass
else:
    print(res)
A, B, N = map(int, input().split())

if N < B:
    print((A*N)//B)

ans = 0
for x in range(N+1):
    fir = (A*x)//B
    sec = x//B
    ans = max(ans, fir - A * sec)

    # 終了判定
    if ans == B-1:
        break

print(ans)
import sys
import math
import fractions
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**7)

A, B, N = map(int, input().split())

m = -1

for x in range(1, N+1):
    res = math.floor(A * x / B) - A * math.floor(x / B)
    print(res)
    if res >= m:
        m = res
    elif res == 0:
        break
    else:
        break

print(m)
A,B,N=map(int,input().split())
x=min(B,N)
ans=(A*x)//B
print(ans)
a,b,n = map(int, input().split())

if b == 1 or a == 1:
    print(0)
    exit()
if n//b < 1:
    print((a*n)//b)
else:
    print((a*b-1)//b)
import sys
import itertools
# import numpy as np
import time
import math

sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b, n = map(int, readline().split())

x = min(b, n)
if b == n:
    x = b - 1
if x == 0:
    print(a)
    exit()
ans = math.floor((a * x) / b) - a * math.floor(x / b)
print(ans)
import math

#数値ひとつ
#I = int(input())
#数値空白区切りで欲しいとき
A, B, N = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#list = list(N)
#数値を受け取る数が未定かつリストにしたいとき
#list = list(map(int, input().split()))
#受け取る文字列が未定かつリストにしたいとき(Iは回数)
#list = [input() for i in range(I)]

print(math.floor(A*N/B)-A*math.floor(N/B))
a, b, n = map(int, input().split())
ans = int((a * n) / b) - a * int(n / b)

for i in range(0, min(1000000, n) + 1):
  n = n - 1
  ans=max(ans, int((a * i) / b) - a * int(i / b))
  
for i in range(0, min(1000000, n) + 1):
  n = i
  ans=max(ans, int((a * i) / b) - a * int(i / b))
for i in range(min(1000000, n) + 1, n + 1):
  n = i
  ans=max(ans, int((a * i) / b) - a * int(i / b))
print(max(ans, 0))
from sys import stdin
import sys

A, B, N = [int(x) for x in stdin.readline().rstrip().split()]
# N, M = [int(x) for x in stdin.readline().rstrip().split()]
# U = input().split()
ans = int((A*N)/B)-A*int(N/B)
if N >= B-1:
    ans1 = int((A*(B-1))/B)-A*int((B-1)/B)
else:
    ans1 = ans
if N > 100000:
    p = N-100000
else:
    p = 1
for i in range(p, N+1):
    temp = int((A*i)/B)-A*int(i/B)
    if temp > ans:
        # print(i)
        ans = temp

print(max(ans, ans1))
def main(n,m,q):
    l=[]
    for i in range(1,q+1):
        j=n*i//m-n*(i//m)
        l.append(j)
    sorted(l)
    print(l[-1])
n,m,q=map(int,input().split())
main(n,m,q)
a, b, n, = map(int, input().split())

print(int(a*(n)/b)-a*int((n)/b))
a,b,n=map(int,input().split())
ans=0
for i in range(1,min(a,n)+1):ans=max(ans,(a*i)//b-a*(i//b))
print(ans)
a, b, n = map(int, input().split())
 
tmp = 0
for x in (range(b, b+1) if b<=n else range(1, n+1, n-1)):
#for x in range(1, n+1):
    calc = a*x//b - a*(x//b)
    if calc > tmp:
        tmp = calc
 
print(tmp)
A, B, N = map(int, input().split())

x = B - 1
ans = (A*x)//B-A*(x//B)

print(ans)
import math
A,B,N=map(int,input().split())
start=0
i=max(B-1,N)
K=math.floor(((i/B)-(i//B))*A)
if start<=K:
    start=K
print(start)
def f(A,B,x):
    return (((A*x)//B)-(A*(x//B)))
def main():
    A,B,N=map(int,input().split())
    lb=1
    ub=N
    while(lb<=ub):
        mid=(lb+ub)//2
        if f(A,B,mid)<N:
            lb=mid+1
        elif f(A,B,mid)>N:
            ub=mid-1
        else:
            break
    print(f(A,B,mid))
if __name__=='__main__':
    main()
A, B, N = map(int, input().split())

if B < N:
    Max = A
    for x in range(B,1+N):
        fx = int(A*x/B) - A * int(x/B)
        Max = max(Max,fx)
elif B == N:
    Max = 0
else:
    Max = int(A*N/B) - A * int(N/B)
print(Max)
#-*-coding:utf-8-*-

def main():
    a, b, n = map(int, input().split())
    ans = 0
    if b > n:
        ans = (a * (n-1)) // b
    elif b == n:
        ans = (a * (n - 1)) // b
    else:
        ans = (a * b) // b
    print(ans)
    
if __name__ == '__main__':
    main()
#!/usr/bin/python3
# -*- coding: utf-8 -*-
s, w = map(int, input().split())

if s > w:
    print("safe")
else:
    print("unsafe")
S, W = map(int, input().split())
if S <= W:
  print('unsafe')
  
else:
  print('safe')
[s,w] = [int(i) for i in input().split()]
if s <= w:
    print("unsafe")
else:
    print("safe")
a,b=(int(i)for i in input().split())
print("unsafe" if a<=b else "safe")
S, W = map(int, input().split())

print("unsafe") if W >= S else print("safe")
s, w = map(int, input().split())
print("unsafe" if w >= s else "safe")
n, m = map(int, input().split())

if m >= n:
    print('unsafe')

else:
    print('safe')
S,W=map(int,input().split())

if W>=S:
    print("unsafe")

else:
    print("safe")
s,w = map(int,input().rstrip().split(" "))
if w >= s:
    print("unsafe")
else:
    print("safe")
s, w =  map(int, input().split())

if s<= w:
    print("unsafe")
else:
    print("safe")
s,w = list(map(int,input().split()))
if s <= w:
    print("unsafe")
else:
    print("safe")
(s, w) = tuple(map(int, input().split(" ")))
if w >= s:
    print("unsafe")
else:
    print("safe")
s,w = map(int,input().split())
if s <= w:
  print('unsafe')
else:
  print('safe')
S, W = map(int, input().split())
print("unsafe" if S <= W else "safe")
S, W = list(map(int, input().split()))

ans = "unsafe"
if S > W:
    ans = "safe"

print(ans)
s, w = map(int, input().split())
print('unsafe' if w >= s else 'safe')
s, w = list(map(int,input().split()))
if s > w:
    print('safe')
else:
    print('unsafe')
S,W = list(map(int,input().split()))
print("safe" if S>W else "unsafe")
import sys

input = sys.stdin.readline


def solve():
    s, w = map(int, input().split())
    if w >= s:
        return 'unsafe'
    else:
        return 'safe'


if __name__ == '__main__':
    answer = solve()
    print(answer)
s, w = map(int, input().split())
print('safe' if w<s else 'unsafe')
S,W = map(int,input().split())
if S > W:
    print("safe")
else:
    print("unsafe")
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S, W = lr()
bl = W >= S
print('unsafe' if bl else 'safe')
a=list(map(int,input().split()))
if a[1]>=a[0]:
    print('unsafe')
else:
    print('safe')
s,w = map(int,input().split())
if w >= s :
  print('unsafe')
else :
  print('safe')
s,w=list(map(int,input().split()))
if s>w:
    print('safe')
else:
    print('unsafe')
S,W = map(int, input().split())
if W >= S:
    print('unsafe')
else:
    print('safe')
s,w = map(int,input().split())
print('unsafe' if w >= s else 'safe')
S,W = map(int,input().split())

if W >= S:
    print('unsafe')
else:
    print('safe')
S,W = map(int,input().split())

if(S>W):
    print("safe")

else:
    print("unsafe")
s,w=map(int,input().split())
if w>=s:
  print('unsafe')
else:
  print('safe')
a,b=map(int,input().split())

print("safe" if a>b else "unsafe")
def main():
    S, W = map(int, input().split())
    if S <= W:
        print("unsafe")
    else:
        print("safe")
    return 0

if __name__ == '__main__':
    main()
# ABC164a


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    # 再帰関数を使わない限りPypyで出すこと

    def dump(*args):
        sys.stderr.write(str(args))

    s, w = map(int, input().split())
    if s <= w:
        print('unsafe')
    else:
        print('safe')


if __name__ == '__main__':
    main()
S,W=map(int,input().split())
print('un'*(S<=W) + 'safe')
S, W = [int(_) for _ in input().split()]
if W >= S:
    print('unsafe')
else:
    print('safe')
inputList = input().split()

s = int(inputList[0])
w = int(inputList[1])

if s <= w:
    print("unsafe")
else:
    print("safe")
S,W = map(int,input().split())
if (S > W):
    print("safe")
else:
    print("unsafe")
#!/usr/bin/env python3
s, w = map(int, input().split())
print("unsafe" if s<=w else "safe")
s, w = map(int, input().split())

if w >= s:
  print("unsafe")
else:
  print("safe")
S,W = map(int,input().split())
print('safe' if S > W else 'unsafe')
s, w = map(int, input().split())
if w >= s:
    print("unsafe")
else:
    print("safe")
s, w = map(int, input().split())

if w >= s:
    print('unsafe')
else:
    print('safe')
s, w = list(map(int, input().rstrip().split()))

print('unsafe' if w >= s else 'safe')
S,W=map(int,input().split())
if S<=W:print('unsafe')
else:print('safe')
s, w = list(map(int, input().split()))

if s <= w:
    print("unsafe")
else:
    print("safe")
S,W = map(int,input().split())


if S > W:
    print("safe")
else:
    print("unsafe")
s, w = map(int, input().split())
print('unsafe' if s <= w else 'safe')
s,w = (int(x) for x in input().split())
# xl = map(int, input().split())

if w >= s:
	print('unsafe')
else:
	print('safe')
S, W = map(int,input().split())
print("unsafe" if W >= S else "safe")
#!/usr/bin/env python3
import sys


def solve(S: int, W: int):
    if S <= W: return 'unsafe'
    else: return 'safe'


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    print(solve(S, W))

if __name__ == '__main__':
    main()
S,W = map(int,input().split())
if S <= W:
    print('unsafe')
else:
    print('safe')
import sys
sys.setrecursionlimit(10**7)
input = lambda: sys.stdin.readline().strip()

def main():
    S,W = map(int,input().split())
    print("unsafe" if S<=W else "safe")

main()
inputLine = input()

tempStr = inputLine.split(' ')

numSheep = int(tempStr[0])
numWolf = int(tempStr[1])


print("unsafe" if numWolf >= numSheep else "safe")
def main():
  s,w = map(int,input().split())
  if s <= w:
    print('unsafe')
  else:
    print('safe')

if __name__ == '__main__':
  main()
s,w = map(int,input().split())
if w >= s:
    print("unsafe")
else:
    print("safe")
n, k = input().split(" ")
n = int(n)
k = int(k)
print("unsafe" if k >= n else "safe")
s,w=map(int,input().split())
if s>w: print("safe")
else: print("unsafe")
a, b = input().split()
a = int(a)
b = int(b)

if a > b:
  print('safe')
else:
  print('unsafe')
s,w = map(int, input().split())
if s <= w:
    print("unsafe")
else:
    print("safe")
S, W = map(int, input().split())
if S <= W:
    print('unsafe')
else:
    print('safe')
S, W = map(int, input().split())
print('unsafe' if S <= W else 'safe')
a, b = map(int, input().split())

if a > b:
    print('safe')
else:
    print('unsafe')
s,w = map(int,input().split())
print("unsafe" if s<=w else "safe")
import sys

if __name__ == '__main__':
    S, W = map(int, input().split())
    print('unsafe' if W >= S else 'safe')
S, W = map(int, input().split())

if S <= W:
    print("unsafe")
else:
    print("safe")
S,W = map(int,input().split())

if W<S:
    print("safe")
else:
    print("unsafe")
S,W = map(int, input().split())
s = 'safe'  if S > W else 'unsafe'
print(s)
S, W = map(int, input().split())

if W >= S:
    print('unsafe')
else:
    print('safe')
a, b = map(int, input().split())
print('safe' if a > b else 'unsafe')
num_list = [int(i) for i in input().split()]

if num_list[0] <= num_list[1]:
    print('unsafe')
else:
    print('safe')
def main():
    import sys

    input = sys.stdin.readline
    n, w = map(int, input().split())

    if n > w:
        print("safe")
    else:
        print("unsafe")
if __name__ == "__main__":
    main()
S,W=(int(x) for x in input().split())
if S>W:
    print('safe')
else:
    print('unsafe')
s,w=map(int,input().split())
if s<=w:
    print("unsafe")
else:
    print("safe")
s,w = map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

if w >= s:
    print("unsafe")
else:
    print("safe")
S,W = map(int,input().split())
if W >= S:
    print('unsafe')
else:
    print('safe')
a,b = map(int,input().split())

if a>b:
	print('safe')
else:
		print('unsafe')
S,W=map(int, input().split())
print('unsafe' if S <= W else 'safe')
sheeps, wolves = input().split(' ') 
if (int(sheeps) > int(wolves)):
    print('safe')
else:
    print('unsafe')
s,w=map(int,input().split())
if s <= w:print("unsafe")
else:print("safe")
s, w = map(int, input().split())
print("unsafe" if s <= w else "safe")
from sys import stdin

def main():
	inp=stdin.readline
	s,w=map(int, inp().split())
	if w>=s:
		print("unsafe")
	else:
		print("safe")
main()
s,w = map(int,input().split())
if s <= w:
    print("unsafe")
else:
    print("safe")
s,w = map(int, input().split())

if s <= w:
  print('unsafe')
else:
  print('safe')
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

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

if w>=s:
    print('unsafe')
else:
    print('safe')
s, w = list(map(int, input().split(" ")))
if s <= w:
  print("unsafe")
else:
  print("safe")
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    s, w = map(int, input().split())
    if w >= s:
        print('unsafe')
    else:
        print('safe')
if __name__ == '__main__':
    main()
def main():
    S, W = map(int, input().split())
    if W >= S:
        print('unsafe')
    else:
        print('safe')


if __name__ == '__main__':
    main()
s,w = map(int,input().split())

if s > w:
  print("safe")
else:
  print("unsafe")
s,w=map(int,input().split())
if s<=w:
  print('unsafe')
else:
  print('safe')
s,w=map(int,input().split())
if w>=s:
    print("unsafe")
    exit()
print("safe")
def main():
    S, W = list(map(int, input().split()))
    
    print("unsafe" if S <= W else "safe")
    pass

if __name__ == '__main__':
    main()
import math
import sys
readline = sys.stdin.readline


def main():
    s, w = map(int, readline().rstrip().split())
    print("unsafe" if s <= w else "safe")


if __name__ == '__main__':
    main()
s,w=map(int, input().split())
if s<=w:
    print('unsafe')
else:
    print('safe')
s,w = map(int,input().split())

if w >= s:
    print('unsafe')
else:
    print('safe')
# -*- coding: utf-8 -*-

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

if s > w:
    print('safe')
else:
    print('unsafe')
S, W = map(int, input().split())
if S <= W:
  print('unsafe')
else:
  print('safe')
S, W = map(int, input().split())

if(S > W):
    print('safe')
else:
    print('unsafe')
def resolve(S: int, W: int) -> str:
    if S <= W:
        return 'unsafe'
    else:
        return 'safe'

if __name__ == '__main__':
    S, W = map(int, input().split())
    res = resolve(S, W)
    print(res)
x = input()
s = int(x.split()[0])
w = int(x.split()[1])

if w >= s:
  print("unsafe")
else:
  print("safe")
#!/usr/bin/env python3

s,w=map(int,input().split())
if s<=w:
    print('unsafe')
else:
    print('safe')
# S,Wの入力
S,W = map(int,input().split())

# S,Wの比較
if S > W:
    print("safe")
else:
    print("unsafe")
s,w =map(int,input().split())

if s <= w:
    print('unsafe')
else:
    print('safe')
S, W = (int(i) for i in input().split())  

if (S <= W):
    print("unsafe")
else:
    print("safe")
s, w = [int(s) for s in input().split(" ")]
if w >= s:
  print("unsafe")
else:
  print("safe")
n,m = map(int,input().split())
if(m>=n):   print("unsafe")
else:   print("safe")
s, w = map(int, input().split())
if w >= s:
    print('unsafe')
else:
    print('safe')
S,W=map(int,input().split())
if S>W:
    print('safe')
else:
    print('unsafe')
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))
out = lambda x: print('\n'.join(map(str, x)))

s, w = inm()
print("unsafe" if w >= s else "safe")
S, W = [int(i) for i in input().split()]

if S <= W:
  print('unsafe')
else:
  print('safe')
S,W = list(map(int,input().split()))

if S<=W:
    print("unsafe")
else:
    print("safe")
s,w = map(int,input().split())

print("safe") if w < s else print("unsafe")
s,w=map(int,input().split())
if w>=s:
    print("unsafe")
else:
    print("safe")
# encoding="UTF-8"

S,W = input().split()
S=int(S)
W=int(W)
if W >= S:
    print("unsafe")
elif W < S:
    print("safe")
S,W=map(int,input().split())
if S<=W:
    print("unsafe")
else:
    print("safe")
line = [int(s) for s in input().split()]

if line[0] > line[1]:
    print('safe')
else:
    print('unsafe')
L = list(map(int,input().split()))
S=L[0]
W=L[1]
if W>=S:
 print("unsafe")
else:
 print("safe")
s,w= map(int,input().split())
if w>=s:
  print("unsafe")
else:
  print("safe")
S, W = [int(_) for _ in input().split()]

if W >= S:
    print("unsafe")
else:
    print("safe")
s,w=map(int,input().split())
if s>w:
    print('safe')
else:
    print('unsafe')
S,W = map(int, input().split())
if S <= W:
    print("unsafe")
else:print("safe")
s, w = [int(x) for x in input().split()]

if w >= s:
    print('unsafe')
else:
    print('safe')
S, W = map(int, input().split())
if S <= W:
    print("unsafe")
else:
    print("safe")
s,w = map(int,input().split())
print("safe" if s > w else "unsafe")
s,w=list(map(int, input().split()))

if w>=s:
  print("unsafe")
else:
  print("safe")
if __name__ == "__main__":
    S, W = map(int, input().split())
    print("unsafe" if S <= W else "safe")
S,W = map(int,input().split())

if S<=W:
  print("unsafe")
else:
  print("safe")
A,B=map(int,input().split())
if A <= B:
  print("unsafe")
else:
  print("safe")
s, w=map(int, input().split())

if s>w:
    print('safe')

elif s<=w:
    print('unsafe')
S, W = map(int, input().split())

if W>=S:
    print('unsafe')
else:
    print('safe')
s,w=map(int,input().split())
if w>=s:
  ans='unsafe'
else:
  ans='safe'
print(ans)
s,w=map(int,input().split())

if s <= w:
    print('unsafe')
else:
    print('safe')
s,w=input().split()
if(int(s)>int(w)):
    print('safe')
else:
    print('unsafe')