qyliang/CodeNanoFix huggingface dataset:
# Buggy code:
from collections import defaultdict

def gcd(x, y):
    if x < 0:
        x, y = y, x
    r = x % y
    while r:
        x, y, r = y, r, y%r
    return y
    
def main():
    n = int(input())
    mod = 1000000007
    p = defaultdict(lambda: 0)
    bad = dict()
    zeros = 0
    for _ in range(n):
        a, b = map(int, input().split())
        if a == 0 and b == 0:
            zeros += 1
        else:
            if a == 0:
                p["0"] += 1
                bad["0"] = "INF"
            elif b == 0:
                p["INF"] += 1
                bad["INF"] = "0"
            else:
                g = gcd(a, b)
                a //= g
                b //= g
                sp = f"{a}_{b}"
                if b < 0:
                    b *= -1
                    a *= -1
                sm = f"{b}_{-a}"
                p[sp] += 1
                bad[sp] = sm
    done = set()
    good = 0
    for key, num in p.items():
        if key in done:
            continue
        b = a[bad[key]]
        done.add(bad[key])
        if b > 0:
            ans *= pow(2, b, mod)*pow(2, num, mod)-1
            ans %= mod
        else:
            good += num
    ans *= pow(2, good, mod)
    ans += zeros
    ans -= 1
    ans %= mod
    print(ans)
        
        

if __name__ == "__main__":
    main()

# Fixed code:
from collections import defaultdict

def gcd(x, y):
    r = x % y
    while r:
        x, y, r = y, r, y%r
    return y
    
def main():
    n = int(input())
    mod = 1000000007
    p = defaultdict(lambda: 0)
    bad = dict()
    zeros = 0
    for _ in range(n):
        a, b = map(int, input().split())
        if a == 0 and b == 0:
            zeros += 1
        else:
            if a == 0:
                p["0"] += 1
                bad["0"] = "INF"
            elif b == 0:
                p["INF"] += 1
                bad["INF"] = "0"
            else:
                g = gcd(b, a)
                a //= g
                b //= g
                sp = f"{a}_{b}"
                if b < 0:
                    b *= -1
                    a *= -1
                sm = f"{b}_{-a}"
                p[sp] += 1
                bad[sp] = sm
    done = set()
    good = 0
    ans = 1
    for key, num in p.items():
        if key in done:
            continue
        b = p.get(bad[key])
        done.add(bad[key])
        if b:
            ans *= pow(2, b, mod)+pow(2, num, mod)-1
            ans %= mod
        else:
            good += num
    ans *= pow(2, good, mod)
    ans += zeros
    ans -= 1
    ans %= mod
    print(ans)
        
        

if __name__ == "__main__":
    main()
# Buggy code:
n, k = map(int,input().split())
data = []
for _ in range(k):
    d = int(input())
    data.extend(list(map(int,input().split())))

print(data)
print(n-len(set(data)))

# Fixed code:
n, k = map(int,input().split())
data = []
for _ in range(k):
    d = int(input())
    data.extend(list(map(int,input().split())))

print(n-len(set(data)))
# Buggy code:
n,k = map(int,input().split())
sunuke = list(range(1,n+1))
i = 0
kashi_sunuke = []
d = ''
while i < k:
  d = input()
  okashi = list(map(int,input().split()))
  kashi_sunuke += okashi
  i+=1

o = list(set(sunuke) - set(kashi_sunuke))
print('o', o, len(o))


# Fixed code:
n,k = map(int,input().split())
sunuke = list(range(1,n+1))
i = 0
kashi_sunuke = []
d = ''
while i < k:
  d = input()
  okashi = list(map(int,input().split()))
  kashi_sunuke += okashi
  i+=1

o = list(set(sunuke) - set(kashi_sunuke))
print(len(o))
# Buggy code:
(n, k) = [int(s) for s in input().split()]

data = arr = [[0 for i in range(k + 1)] for j in range(n + 1)]

for i in range(0, k):
    d = int(input())
    a = [int(s) for s in input().split()]

    for m in a:
        data[m - 1][d - 1] = 1

dd = []

for d in data:
    dd.append(sum(d))

ans = 0

for ddd in dd:
    if ddd == 0:
        ans += 1

print(ans)



# Fixed code:
(n, k) = [int(s) for s in input().split()]

data = [[0 for i in range(k)] for j in range(n)]

for i in range(0, k):
    d = int(input())
    a = [int(s) for s in input().split()]

    for m in a:
        data[m - 1][i] = 1

dd = []

for d in data:
    dd.append(sum(d))

ans = 0

for ddd in dd:
    if ddd == 0:
        ans += 1

print(ans)
# Buggy code:
n, k = map(int, input().split())
d = []
a = []
for i in range(k):
    d.append(int(input))
    a.append(list(map(int, input().split())))

aa = [0]*n

for j in a:
    for t in j:
        aa[t - 1] += 1

ans = 0

for z in aa:
    if z == 0:
        ans += 0

print(ans)

# Fixed code:
n, k = map(int, input().split())
d = []
a = []
for i in range(k):
    d.append(int(input()))
    a.append(list(map(int, input().split())))

aa = [0]*n

for j in a:
    for t in j:
        aa[t - 1] += 1

ans = 0

for z in aa:
    if z == 0:
        ans += 1
    else:
        ans += 0

print(ans)
# Buggy code:
#coding:utf-8

n,k = map(int,input().split())

sunuke = ["{}".format(i) for i in range(1,n+1)]

for i in range(k):
    d = int(input())
    a = input().split()
    for i in a:
        if i in sunuke:
            sunuke.remove(i)
    print(sunuke)

ans = len(sunuke)

print("{}".format(ans))

# Fixed code:
#coding:utf-8

n,k = map(int,input().split())

sunuke = ["{}".format(i) for i in range(1,n+1)]

for i in range(k):
    d = int(input())
    a = input().split()
    for i in a:
        if i in sunuke:
            sunuke.remove(i)

ans = len(sunuke)

print("{}".format(ans))
# Buggy code:
n, k = map(int,input().split())
A = []
N = []

N = set(range(1,n+1))

for i in range(1,k+1):
    d = int(input())
    a=set(map(int,input().split()))
    A += a

ans = list(N-A)

print(len(ans))

# Fixed code:
n, k = map(int,input().split())
A = []
N = []

N = list(range(1,n+1))

for i in range(1,k+1):
    d = int(input())
    a=list(map(int,input().split()))
    A += a

ans = list(set(N)-set(A))

print(len(ans))
# Buggy code:
n,k=map(int,input().split())
m=[]
for i in range(n):
  d=int(input())
  a=list(map(int,input().split()))
  for i in a:
    m=m.append(i)
j=set(m)
print(n-len(j))
  
  

# Fixed code:
n,k=map(int,input().split())
m=[]
for i in range(k):
  d=int(input())
  a=list(map(int,input().split()))
  for p in a:
    m.append(p)
j=set(m)
print(n-len(j))
# Buggy code:
N,K = map(int,input().split())
N,K
d = [0]*K
A = [[]]*K
A
for i in range(K):
    d[i] = int(input())
    A[i] = list(map(int,input().split()))

count = 0
for i in range(N):
    for j in range(K):
        if i in A[j]:
            count += 1

print(count)    


# Fixed code:
N,K = map(int,input().split())
N,K
d = [0]*K
A = [[]]*K
A
for i in range(K):
    d[i] = int(input())
    A[i] = list(map(int,input().split()))

count = 0
for i in range(N):
    flag = 1
    for j in range(K):
        if i+1 in A[j]:
            flag = 0
    if flag == 1:
        count += 1

print(count)
# Buggy code:
N, K = map(int, input().split())
A = set()
for _ in range(K):
  d = int(input())
  A.add(list(input().split()))
print(N - len(A))


# Fixed code:
N, K = map(int, input().split())
A = set()
for _ in range(K):
  d = int(input())
  A.update(list(map(int, input().split())))
print(N - len(A))
# Buggy code:
n,m = map(int,input().split())

d = {}

for i in range(m):
    input()
    L = list(map(int,input().split()))
    for j in L:
        d[j] = j

print(n - len(L))
    

# Fixed code:
n,m = map(int,input().split())

d = {}

for i in range(m):
    input()
    L = list(map(int,input().split()))
    #print(L)
    for j in L:
        d[j] = j

#print(d)
print(n - len(d))
# Buggy code:
n,k=map(int,input().split())
l=[0]*n
for i in range(k):
  d=int(input())
  h=[int(input()) for i in range(d)]
  for j in d:
    l[j-1]=1
print(l.count(0))

# Fixed code:
n,k=map(int,input().split())
l=[0]*n
for i in range(k):
  d=int(input())
  h=list(map(int,input().split()))
  for j in h:
    l[j-1]=1
print(l.count(0))
# Buggy code:
line1 = input().split()
n = int(line1[0])
k = int(line1[1])
list1 = []
for i in range(k):
  d = input()
  lst = input().split()
  list1 += lst

set1 = set(list1)
nothing = set(i for i in range(n)) - set1
print(len(nothing))

# Fixed code:
line1 = input().split()
n = int(line1[0])
k = int(line1[1])
list1 = []
for i in range(k):
  d = input()
  lst = input().split()
  list1 += lst

set1 = set(list1)
nothing = set(str(i+1) for i in range(n)) - set1
print(len(nothing))
# Buggy code:
N, K = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(2 * K)]

treated = (list(range(1, N+1)))

for i in range(int((K+1)/2)):
  tt = list(set(list(range(1, N+1))) - set(l[2*i+1]))
  print(tt)
  treated = list(set(treated) & set(tt))

print(len(treated))

# Fixed code:
N, K = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(2 * K)]

treated = (list(range(1, N+1)))

for i in range(K):
  tt = list(set(list(range(1, N+1))) - set(l[2*i+1]))
  treated = list(set(treated) & set(tt))

print(len(treated))
# Buggy code:

d = []
A = []
for i in range(K):
    _d = int(input())
    d.append(_d)
    _a = [int(x) for x in input().split()]
    A.append(_a)

res = []
for i in range(1, N+1):
    res.append(i)

for a in A:
    for _a in a:
        if _a in res:
            res.remove(_a)
print(len(res))


# Fixed code:
N, K = [int(x) for x in input().split()]

d = []
A = []
for i in range(K):
    _d = int(input())
    d.append(_d)
    _a = [int(x) for x in input().split()]
    A.append(_a)

res = []
for i in range(1, N+1):
    res.append(i)

for a in A:
    for _a in a:
        if _a in res:
            res.remove(_a)
print(len(res))
# Buggy code:
N, K = map(int, input().split())

d = []
l = []
i = 0

while i <= 2*K:
  i += 1
  if i % 2 == 1:
    d.append(int(input()))
  else:
    l.extend([int(x) for x in input().split()])

L = set(l)
print(K - len(L))

# Fixed code:
N, K = map(int, input().split())

d = []
l = []
i = 0

while i < 2*K:
  i += 1
  if i % 2 == 0:
    l.extend([int(x) for x in input().split()])
  else:
    d.append(int(input()))

L = list(set(l))
print(N - len(L))
# Buggy code:
n,k = map(int,input().split())

z = 0
l = [0]
for i in range(k):
  d=int(input())
  s =list(map(int,input().split()))
  l.extend(s)
  
print(l)
for i in range(n+1):
  if l.count(i)==0:
    z = z + 1
print(z)

# Fixed code:
n,k = map(int,input().split())

z = 0
l = [0]
for i in range(k):
  d=int(input())
  s =list(map(int,input().split()))
  l.extend(s)
for i in range(n+1):
  if l.count(i)==0:
    z = z + 1
print(z)
# Buggy code:
N,K=map(int,input().split())
A=[]
people=list(range(1,N+1,1))
for idx in range(K):
    d=int(input())
    X=list((map(int,input().split())))
    for i in range(len(X)):
        A.append(X[i])
ans =[i for i in people if not i in A]
print(ans[0])

# Fixed code:
N,K=map(int,input().split())
A=[]
people=list(range(1,N+1,1))
for idx in range(K):
    d=int(input())
    X=list((map(int,input().split())))
    for i in range(len(X)):
        A.append(X[i])
ans =[i for i in people if not i in A]
print(len(ans))
# Buggy code:
N, K = map(int, input().split())
A = []
for i in range(K):
    d = int(input())
    B = list(map(int, input().split()))
    A.extend(B)
E = list(set(A))
F = N - len(E)

# Fixed code:
N, K = map(int, input().split())
A = []
for i in range(K):
    d = int(input())
    B = list(map(int, input().split()))
    A.extend(B)
E = list(set(A))
F = N - len(E)
print(F)
# Buggy code:
n, k = map(int, input().split())
count = 0
lis = []

for m in range(0, k):
  d = int(input())
  li = [int(i) for i in input().split()]
  lis = lis + li
  
print(lis)
  
for s in range(1, n+1):
  if s in lis:
    count += 0
  else:
    count += 1

print(count)

# Fixed code:
n, k = map(int, input().split())
count = 0
lis = []

for m in range(0, k):
  d = int(input())
  li = [int(i) for i in input().split()]
  lis = lis + li
  
for s in range(1, n+1):
  if s in lis:
    count += 0
  else:
    count += 1

print(count)
# Buggy code:
N,M=list(map(int,input().split()))
    si=[0]*N
    ans=0
    for i in range(M):
        S=int(input())
        who=list(map(int(input())))
        for k in range(S):
            si[who[k]]+=1
    for h in range(N):
        if si[h]==0:
          ans+=1
print(ans)

# Fixed code:
N,M=list(map(int,input().split()))
si=[0]*N
ans=0
for i in range(M):
    S=int(input())
    who=list(map(int,input().split()))
    for k in range(S):
        si[who[k]-1]+=1
for h in range(N):
  if si[h]==0:
    ans+=1
print(ans)
# Buggy code:
import math
n, k = map(int, input().split())
d = []
a = []
for i in range(k):
    d.append(int(input()))
    a.extend(input().split())
print(a)
ans = len(set(a))
print(n - ans)

# Fixed code:
import math
n, k = map(int, input().split())
d = []
a = []
for i in range(k):
    d.append(int(input()))
    a.extend(input().split())
ans = len(set(a))
print(n - ans)
# Buggy code:
n,k =map(int,input().split())

D=[]
A=[]
C=[]
for i in range(k):
    D.append(int(input()))
    A.append(list(map(int,input().split())))
for i in range(1,n+1):
    C.append(int(i))

for i in range(k-1):
    for a in A[i]:
        if C.count(a)!=0:
            C.remove(a)
        
print( C, len(C) )



# Fixed code:
n,k =map(int,input().split())

D=[]
A=[]
C=[]
for i in range(k):
    D.append(int(input()))
    A.append(list(map(int,input().split())))
for i in range(1,n+1):
    C.append(int(i))

for i in range(k):
    for a in A[i]:
        if C.count(a)!=0:
            C.remove(a)
        
print( len(C) )
# Buggy code:
N,K=map(int,input().split())
D=[]
A=[]
for i in range(K):
    d=int(input())
    D.append(d)
    Ai=[int(x) for x in input().split()]
    A.append(Ai)
NUMBERS=[int(x) for x in range(1,N+1)]
for i in range(K):
    for j in range(D[i]):
        if A[i][j] in NUMBERS:
            NUMBERS.remove(A[i][j])
for i in range(len(NUMBERS)):
    print(len(NUMBERS))


# Fixed code:
N,K=map(int,input().split())
D=[]
A=[]
for i in range(K):
    d=int(input())
    D.append(d)
    Ai=[int(x) for x in input().split()]
    A.append(Ai)
NUMBERS=[int(x) for x in range(1,N+1)]
for i in range(K):
    for j in range(D[i]):
        if A[i][j] in NUMBERS:
            NUMBERS.remove(A[i][j])
        else:
            pass
print(len(NUMBERS))
# Buggy code:
l1=input().split(" ")
n=int(l1[0])
k=int(l1[1])
list=[range(n)]
kashi=[]
for i in range(k):
  tmp=input()
  num=input().split(" ")
  kashi.append(num)
kashi=set(kashi)
print(n-len(kashi))

# Fixed code:
l1=input().split(" ")
n=int(l1[0])
k=int(l1[1])
list=[range(n)]
kashi=[]
for i in range(k):
  tmp=input()
  num=input().split(" ")
  for j in num:
    kashi.append(j)
kashi=set(kashi)
print(n-len(kashi))
# Buggy code:
n,k=list(map(int, input().split()))
dic={}
for i in range(2*k):
  j=int(input())
  l=list(map(int, input().split()))
  for a in l:
    if a not in dic:
      dic[a]=True
x=len(list(dic.keys()))
print(n-x)
  

# Fixed code:
n,k=list(map(int, input().split()))
dic={}
for i in range(k):
  j=int(input())
  l=list(map(int, input().split()))
  for a in l:
    if a not in dic:
      dic[a]=True
x=len(list(dic.keys()))
print(n-x)
# Buggy code:
n,k = map(int, input().split())
di=[0]*k
Ap=[0]*n
for i in range(0,k):
    di[i] = int(input())
    A = list(map(int, input().split()))
    ai=0
    for j in range(1,di[i]+1):
        if A[ai]==j:
            ai=ai+1
            Ap[j-1]=1
num=0
for l in range(0,n):
    if Ap[l]==0:
        num=num+1
print(num)

# Fixed code:
n,k = map(int, input().split())
di=[0]*k
Ap=[0]*n
for i in range(0,k):
    di[i] = int(input())
    A = list(map(int, input().split()))
    ai=0
    A.append(-100)
    for j in range(1,n+1):
        if A[ai]==j:
            ai=ai+1
            Ap[j-1]=1
num=0
for l in range(0,n):
    if Ap[l]==0:
        num=num+1
print(num)
# Buggy code:
N,K=map(int,input().split())

sunuke_list=[i+1 for i in range(N)]

for i in range(K):
    d=int(input())
    a=list(map(int,input().split()))
    b=set(sunuke_list)-set(a)
    sunuke_list=list(b)
    print(sunuke_list)
    
print(len(sunuke_list))

# Fixed code:
N,K=map(int,input().split())

sunuke_list=[i+1 for i in range(N)]

for i in range(K):
    d=int(input())
    a=list(map(int,input().split()))
    b=set(sunuke_list)-set(a)
    sunuke_list=list(b)
    
print(len(sunuke_list))
# Buggy code:
n, k = map(int, input().split())
n_list = [1]*n
for _ in range(b):
  _ = input()
  for i in range(list(map(int, input().split()))):
    n_list[i-1] = 0
print(sum(n_list))

# Fixed code:
n, k = map(int, input().split())
n_list = [1]*n
for _ in range(k):
  _ = input()
  for i in list(map(int, input().split())):
    n_list[i-1] = 0
print(sum(n_list))
# Buggy code:
N, K = map(int, input().split())

sunuke = [1] * N

for i in range(K):
    tmp = map(int, input().split())
    for t in tmp:
        sunuke[t-1] = 0
print(sum(sunuke))

# Fixed code:
N, K = map(int, input().split())

sunuke = [1] * N

for i in range(K):
    di = int(input())
    tmp = map(int, input().split())
    for t in tmp:
        sunuke[t-1] = 0
print(sum(sunuke))
# Buggy code:
N, K = map(int, input().split())

have_snack = [0 for i in range(N)]

for k in range(K):
    hito_len = int(input())
    have_hito = map(int, input().split())
    for hh in range(have_hito):
        have_snack[hh - 1] = 1

print(have_snack.count(0))


# Fixed code:
N, K = map(int, input().split())

have_snack = [0 for i in range(N)]

for k in range(K):
    hito_len = int(input())
    have_hito = list(map(int, input().split()))
    for hh in have_hito:
        have_snack[hh - 1] = 1

print(have_snack.count(0))
# Buggy code:
s, w = map(int, input().split())

if w >= s:
    print("safe")
else:
    print("unsafe")

# Fixed code:
s,w = map(int, input().split())

print('unsafe' if w>=s else 'safe')
# Buggy code:
def main():
    s, w = map(int, input().split())
    print('unsefe' if w >= s else 'safe')

if __name__ == '__main__':
    main()

# Fixed code:
def main():
    s, w = map(int, input().split())
    print('unsafe' if w >= s else 'safe')

if __name__ == '__main__':
    main()
# Buggy code:
W,S = [int(x) for x in input().split()]

if W >= S:
  print('unsafe')
else:
  print('safe')

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

if s<w:
	print("unsafe")
elif s==w:
	print("safe")
else:
	print("safe")
		



# Fixed code:
s,w = map(int,input().split())

if s<w or s==w:
	print("unsafe")
else:
	print("safe")
# Buggy code:
S,W = list(map(int,input()split()))
print("safe" if S>W else "unsafe")

# Fixed code:
S,W = list(map(int,input().split()))
print("safe" if S>W else "unsafe")
# Buggy code:
W,S = map(int, input().split())

print('safe' if W < S else 'unsafe')

# Fixed code:
S,W = map(int,input().split())
if S <= W:
  print("unsafe")
else:
  print("safe")
# Buggy code:
import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

S, W = map(int, read())

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


    

# Fixed code:
import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

S, W = map(int, read().split())

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

# Fixed code:
s,w=map(int, input().split())
if w>=s:
    print("unsafe")
else:
    print("safe")
# Buggy code:
s,w =map(input().split())
 
if s>w:
  print("safe")
else:
  print("unsafe")

# Fixed code:
s,w = map(int,input().split())

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

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

# Fixed code:
S,W = map(int,input().split())

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

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


# Fixed code:
s, w = map(int, input().split());

if s <= w:
    print("unsafe");
else:
    print("safe");
# Buggy code:
S,W=[int(i) for i in input().split(" ")]
if W>=S:
    print("unsage")
else:
    print("safe")

# Fixed code:
S,W=[int(i) for i in input().split(" ")]
if W>=S:
    print("unsafe")
else:
    print("safe")
# Buggy code:
s, w = map(int, input().split())
if w >= w:
  print('unsafe')
else:
  print('safe')

# Fixed code:
s,w = map(int,input().split())
if s>w:
    print("safe")
else:
    print("unsafe")
# Buggy code:
a,b = map(int,input().split())
if b > a:
    priant("unsafe")
elif a > b:
    print("safe")

# Fixed code:
a,b = map(int,input().split())
if b >= a:
    print("unsafe")
elif a > b:
    print("safe")
# Buggy code:
S,W = map(int,input().split())

if S < W:
    print("unsafe")
else:
    print("safe")

# Fixed code:
S, W = (map(int,(input().split())))
if (W < S):
  print('safe')
else:
  print('unsafe')
# Buggy code:
S,W=map(int,input().split())
if S<W:
    print("unsafe")
 
else:
    print("safe")
 

# Fixed code:
S,W = map(int,input().split())

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

# Fixed code:
s,w = map(int,input().split())

if s<=w:
    print("unsafe")
else:
    print("safe")
# Buggy code:
s, w = int(input().split())

if s<=w:
  print('unsafe')
else:
  print('safe')

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

if W >= S:
    print(unsafe)
else:
    print(safe)


# Fixed code:
S, W = map(int, input().split())

if W>=S:
    print("unsafe")
else:
    print("safe")
# Buggy code:
s=input()
lis=s.split(" ")
if lis[0]>lis[1]:
    print("safe")
else:
    print("unsafe")

# Fixed code:
s=input()
lis=s.split()
if int(lis[0])>int(lis[1]):
    print("safe")
else:
    print("unsafe")
# Buggy code:
s ,w = input(). int(" ")

s=int(s)
w=int(w)

if w >= s :
  print("unsafe")
else :
  print("safe")

# Fixed code:
s, w = input().split(" ")

s = int(s)
w = int(w)

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

print(S)
print(W)

if S <= W :
  print('unsafe')
else:
  print('safe')

# Fixed code:
S, W = map(int, input().split())

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

# Fixed code:
s, w = map(int,input().split())
res = ""

if s <= w:
    res = "unsafe"
else:
    res = "safe"

print(res)
# Buggy code:
s,w=input().split()
if s>w:
    print("safe")
if w>s:
   print("unsafe")

# Fixed code:
s,w=input().split()
s=int(s)
w=int(w)
if s>w:
    print("safe")
if w>s:
   print("unsafe")
if w==s:
   print("unsafe")
# Buggy code:
s,w = map(int,input().split())
if s < w:
  print('unsafe')
else:
  print('safe')

# Fixed code:
s ,w = map(int, input().split())

if s <= w:
    print("unsafe")
else:
    print("safe")
# Buggy code:
s,w=[int(x) for x in input().splir()]

if(s>w):
  print("safe")
else:
  print("unsafe")

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


# Fixed code:
if __name__ == '__main__':
    S,W = map(int, input().split())
    if S > W:
        print('safe')
    elif S <= W:
        print('unsafe')
# Buggy code:
a,b=map(int,input().split())

if a>b
	print("safe")

else:
	print("unsafe")

# Fixed code:
a,b=map(int,input().split())
if a>b:
  print("safe")
else:
  print("unsafe")