Problem:


Score : 100 points

Problem Statement

There are S sheep and W wolves.

If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep.

If the wolves will attack the sheep, print unsafe; otherwise, print safe.

Constraints

1 \leq S \leq 100

1 \leq W \leq 100

Input

Input is given from Standard Input in the following format:

S W

Output

If the wolves will attack the sheep, print unsafe; otherwise, print safe.

Sample Input 1

4 5

Sample Output 1

unsafe

There are four sheep and five wolves. The number of wolves is not less than that of sheep, so they will attack them.

Sample Input 2

100 2

Sample Output 2

safe

Many a sheep drive away two wolves.

Sample Input 3

10 10

Sample Output 3

unsafe



Sample input:
4 5


Sample output:
unsafe

Submission status: Runtime Error

Solution code:
S = input()
num = len(S)

pair = 0

if num < 5:
    print(0)
else:
    for i in range(5,num):
        for j in range(num-i+1):
            temp = int(S[j:j+i+1])
            if temp % 2019 == 0:
                pair += 1

    print(pair)

Submission status: Runtime Error

Solution code:
S = input()
#S = str(1817181712114)
ans = 0

for a in range(len(S)-1):
	for b in range(a+1, len(S)):
		if int(S[a:b+1]) % 2019 == 0:
			ans += 1        
print(ans)

Submission status: Runtime Error

Solution code:
S=str(input())
ans=0
N=len(S)
for i in range(N):
    j=i+4
    while j<=N:
        if int(S[i:j])%2019==0:
            ans+=1
            i=j+1
            j=j+4
        else:
            j=j+1
print(ans)

Submission status: Runtime Error

Solution code:
a, b, c, d = input().split()
a = int(a)#体力
b = int(b)
c = int(c)#体力
d = int(d)

x = a//d +1
y = c//b

if y == 1:
  if x <= y:
  	print("No")
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
s=input()
n=len(s)
count=0
a=[0 for i in range(n)]
for i in range(3,n):
    a[i]=10**i%2019
if n<4:
    print(0)
else:
    for i in reversed(range(2,n)):
        k=int(s[i-2:i+1])
        h=3
        for j in reversed(range(0,i-2)):
            k=k+a[h]*int(s[j])
            h+=1
            if k%2019==0:
                count+=1
    print(count)

Submission status: Runtime Error

Solution code:
a, b, c, d = input().split()
a = int(a)#体力
b = int(b)
c = int(c)#体力
d = int(d)

x = a//d +1
y = c//b

if y == 1:
  if x <= y:
  	print("NO")
  print("No")
else:
  print("Yes")
print(x,y)

Submission status: Runtime Error

Solution code:
import math
a, b, c, d = map(int, input().split())

if math.ceil(a/d) >= math.ceil(c/b):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
e=a//d
f=c//b
x=a-e*d
y=c-f*b
if x==y==0:
  if f<=e:
    print('Yes')
  else:
    print('N0')
elif x==0 and y!=0:
  if f+1<=e:
    print('Yes')
  else:
    print('No')
elif y==0 and x!=0:
  if f<=e+1:
    print('Yes')
  else:
    print('NO')
else:
  if f<=e:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
while 1:
    c-=b
    if a<=0  or c<=0:
        break
    a -= d
    if a<=0  or c<=0:
        break
print('Yes' if a>0 else 'No')

Submission status: Runtime Error

Solution code:
S,W = map(int,input().suplit())
if W >= S:
  print("unsafe")
else:
  print("safe")

Submission status: Runtime Error

Solution code:
n = int(input())
y = []
for x in range(n):
    y.append(input())
print(len(set(y)))

Submission status: Runtime Error

Solution code:
line = input().split()
a=int(line[0])
b=int(line[1])
c=int(line[2])
d=int(line[3])
e=c//b
f=a//d
if e>=f:
  g=e
else:
  g=f
h=int(c)
j=int(a)
for i in range(ｇ):
	h=h-b
	j=j-d
	if h <= 0:
		print("Yes")
	elif j <= 0:
		print("No")

Submission status: Runtime Error

Solution code:

class Main:

    t1, a1, t2, a2= map(int,input().split());

    while(t1 > 0 and t2 > 0):
        if t2 <= 0:
            break;
        t2 -= a1;
        if t1 <= 0:
            break;
        t1 -= a2;

    if t1 >= t2:
        print("Yes");
    else:
        print("No")

Submission status: Runtime Error

Solution code:
ABCD=input()
ABCD=ABCD.split()
A=int(ABCD[0])
B=int(ABCD[1])
C=int(ABCD[2])
D=int(ABCD[3])
while(1):
    C=C-B
    if(C<=0):
        print('Yes')
        break
    A=A-D
    if(A<=0):
        print('No')
        break

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a,b = input().split()
if int(a) <= int(b):
  print("unsafe")
else:
  print("safe)

Submission status: Runtime Error

Solution code:
N=int(input())
a=[]
for i in range(N):
    a.append(input())
print(len(set(a)))

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
e=a//d
f=c//b
x=a-e*d
y=c-f*b
if x==y==0:
  if f<=e:
    print('Yes')
  else:
    print('N0')
elif x==0 and y!=0:
  if f+1<=e:
    print('YES')
  else:
    print('No')
elif y==0 and x!=0:
  if f<=e+1:
    print('Yes')
  else:
    print('NO')
else:
  if f<=e:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
sheep_number=int(input())
wolf_number=int(input())
if sheep_number<=wolf_number:
    print('unsafe')
else:
    print('safe')

Submission status: Runtime Error

Solution code:
S = input()
ans = 0
for j in range(len(S)):
    for i in range(j-2):
        if i < j:
            if int(S[i:j+1])%2019 == 0:
                ans = ans + 1
print(ans)

Submission status: Runtime Error

Solution code:
S,W= map(int,input())
if S <= W*2:
    print("unsafe")
else:
    print("safe")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# import pandas as pd
#import numpy as np


N = int(input())
keihin = []
for i in range(N):
    keihin.append(input())
# 
# nn = np.array(keihin)
# 
# 
# print(np.unique(nn).size)

Submission status: Runtime Error

Solution code:
S=input()
l=len(S)
z=0
for x in range(l):
    for y in range(l-x-3):
        T=S[x:x+y+4]
        t=int(T)
        
        if t%2019==0:
            z+=1
print(z)

Submission status: Runtime Error

Solution code:
TaHP,TaAP,AoHP,AoAP = map(int, input().split())

Flag_Ta = True

while( TaHP > 0 or AoHP > 0):
	if	Flag_Ta:
		AoHP = AoHP - TaAP
		Flag_Ta = False
	else:
		TaHP = TaHP - AoAP
		Flag_Ta = True
if TaHP > 0:
	print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s = int(input())
w = int(input())
if s <= w:
  print "unsafe"
else:
  print "safe"

Submission status: Runtime Error

Solution code:
s = input()
result = []
for i in range(len(s)):
    for j in range(i+4, len(s)+1):
        if sum(map(int, list((s[i:j])))) % 3 == 0:
            if int(s[i:j]) % 673 == 0 :
                result.append((i, j))
print(len(result))

Submission status: Runtime Error

Solution code:
# import pandas as pd
import numpy as np


N = int(input())
keihin = []
for i in range(N):
    keihin.append(input())

nn = np.array(keihin)


print(np.unique(nn).size)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np

s = input()

# print(s)

ans = np.zeros((len(s)+1, len(s)+1), dtype = np.int)

# print(ans)

if len(s) >= 4:
  for i in range (0, len(s) - 3):
    for j in range (i + 4, len(s)+1):
      num = int(s[i:j])
      # print(num)
      if num % 2019 == 0:
        ans[i, j] += 1

# print(ans)

print(np.sum(ans))

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
cnt = 0
for i in range(N):
    for j in range(i+1, N+1):
        #print(i, j)
        num = int(S[i: j])
        if num % 2019 == 0:
            #print(i, j)
            cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
s = input()
w = input()

if int(s) > int(w):
  print('safe')
else:
  print('unsafe')

Submission status: Runtime Error

Solution code:
s = input()

cnt = 0
for i in range(len(s)):
    for j in range(i+1, len(s)+1):
        if int(s[i:j]) % 2019 == 0:
            cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
e=a//d
f=c//b
x=a-e*d
y=c-f*b
if x==y==0:
  if f<=e:
    print('Yes')
  else:
    print('N0')
if x==0:
  if f+1<=e:
    print('YES')
  else:
    print('No')
if y==0:
  if f<=e+1:
    print('Yes')
  else:
    print('NO')
else:
  if f<=e:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
S = input()
L = len(S)
N = 0

for i in range(L - 3):
    for j in range(4,L - i+1):
        P = int(S[i:i + j])
        if P % 3 == 0:
            if P % 2019 == 0: N += 1

print(N)

Submission status: Runtime Error

Solution code:
S = input()

ans = 0
for i in range(len(S)-3):
    for j in range(i+3, len(S)):
        if int(S[i:j+1]) % 2019 == 0:
            ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import sys

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


def solve():
    s, w = map(int, rl().split())
    if ans = s > w :
        print('safe')
　　else:
　　    print('unsafe')
    

if __name__ == '__main__':
    solve()

Submission status: Runtime Error

Solution code:
N = int(input())
a = []

for i in range(N):
  a.append(input())
  
b = set(a)
print(len(b))

Submission status: Runtime Error

Solution code:
s = str(input())
a = 2019
i = 0
ans = 0
while True:
    i += 1
    b = a * i
    if b > int(s):
        break
    ans += s.count(str(b))
print (str(ans))

Submission status: Runtime Error

Solution code:
s = int(input("Enter number: "))
w = int(input("Enter numner: "))
if (s>=w):
  print("unsafe")
else:
  print("safe")

Submission status: Runtime Error

Solution code:
S = int(input())
W = int(input())

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

Submission status: Runtime Error

Solution code:
tems = list(map(lambda x: int(x), input().split()))
s = items[0]
w = items[1]
print('safe' if s > w else 'unsafe')

Submission status: Runtime Error

Solution code:


class Main:

    s1, s2= int(input().split());

    if s1 <= s2:
        print("unsafe");
    else:
        print("safe");

Submission status: Runtime Error

Solution code:
s = int(input())
w = int(input())
print("safe" if s > w else "unsafe")

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
n=1
while c-b*n>0 and a-d*n>0:
    n+=1
if c-b*(n+1)<=a-d*(n+1):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
s=list(map(int,list(input())))
n=len(s)
m=[[0]*(n+1) for _ in range(n+1)]
ans=0
for i in range(1,n+1):
    for j in range(i,n+1):
        m[i][j]=(m[i][j-1]*10+s[j-1])%2019
        if m[i][j]==0:
            ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
s = input()

l = len(s)
ans = 0

for i in range(l-3):
    left = i
    right = left + 4
    while (right < l+1):
        now = int(s[left:right])
        if (now % 2019 == 0):
            right += 4
            ans += 1
        else:
            right += 1

print(ans)

Submission status: Runtime Error

Solution code:
while True:
    num1 = input('S:')
    num2 = input('W:')
    if int(num1) < 1 | int(num1) > 100 |int(num2) < 1 | int(num2) > 100:
         break
    if int(num1) < int(num2):
         print("safe")
         break
    else:
         print('unsafe')
         break

Submission status: Runtime Error

Solution code:
s=input()
count=0
for i in range(len(s)-3):
    for j in range(i+4,len(s)+1):
        if int(s[i:j])%2019==0:
            count+=1
            i=j
print(count)

Submission status: Runtime Error

Solution code:
import math

N = int(input())
A = N
S = []
for i in range(N):
    S += [input()]
for j in range (1, N):
    for k in range(j):
        if S[k] == S[j]:
            A -= 1
            break
print(A)

Submission status: Runtime Error

Solution code:
while True:
    num1 = input('S:')
    num2 = input('W:')
    if int(num1) < 1 | int(num1) > 100 |int(num2) < 1 | int(num2) > 100:
         break
    if int(num1) < int(num2):
         print("safe")
    else:
         print('unsafe')

Submission status: Runtime Error

Solution code:
s = input()
long = len(s)
count = 0
for i in range(long):
  for j in range(i+1,long):
    num = int(s[i:j+1])
    if len(str(num)) < 4:
      continue
    if num % 2019 == 0:
      count += 1
print(count)

Submission status: Runtime Error

Solution code:
s = input()
ans = 0
for j in range(len(s)):
  for i in range(j):
    if int(s[i:j+1])%2019 == 0:
      ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
s = input('enter a number')
w = input('enter a number')
print('safe' if s > w else 'unsafe')

Submission status: Runtime Error

Solution code:
S=int(input())
W=int(input())
if S>W:
    print('safe')
else:
    print('unsafe')

Submission status: Runtime Error

Solution code:
S = int(input())
W = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = []
count = 0
for i in range(N):
  S.append(input())

for i in range(0,N):
  if S[i] != '0':
    count += 1
    for j in range(i+1,N):
      if (S[j] != '0'):
        if S[i] == S[j]:
          S[j] = '0'
         
print (count)

Submission status: Runtime Error

Solution code:
N = int(input())
S = []
ans = N
for i in range(N):
    S.append(input())
    flg = 0
    j  = 0
    while(flg == 0 and j < i):
        if i != j:
            if len(S[j]) == len(S[i]):
                if S[j][0] == S[i][0]:
                    if S[j] == S[i]:
                        S[j] = ''
                        ans = ans - 1
                        flg = 1
        j = j+1
print(ans)

Submission status: Runtime Error

Solution code:
s=input()
l=len(s)
ans=0
for i in range(0,l-3):
    for j in range(i+3,l):
        test=int(s[i:j+1])
        if test%2019==0:
            ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
N=[int(x) for x in input().split()]
if not N[2]%N[1]==0:
   c=N[2]//N[1]+1
else:
    c=N[2]//N[1]
if not N[0]%N[3]==0:
   c=N[0]//N[3]+1

   d=N[0]//N[3]+1
else:
    d=N[0]//N[3]
if d>c:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
sheep = input()
wolves = input()

if sheep > wolves:
    print('safe')
else:
    print('unsafe')

Submission status: Runtime Error

Solution code:

class Main:

    s = int(input().split());

    if s[0] <= s[1]:
        print("unsafe");
    else:
        print("safe");

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
from collections import defaultdict

S = input().strip()
l = len(S)
dp = [[0 for _ in range(2019)] for i in range(l)]
for i in range(l):
    s = int(S[i])
    for j in range(2019):
        k = (10 * j + s) % 2019
        dp[i][k] = dp[i-1][j]
    dp[i][s] += 1

ans = 0
for i in range(l):
    ans += dp[i][0]
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=[int(x) for x in input().split()]
if not N[2]%N[1]==0:
   c=N[2]//N[1]+1
else:
    c=N[2]//N[1]
if not N[0]%N[3]==0:
   c=N[0]//N[3]+1

   d=N[0]//N[3]+1
else:
    d=N[0]//N[3]
if d>=c:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int, input().split())
i = 1
while a > 0 & c > 0:
    a = a
    c = c - i*b

    if c > 0:
        a = a-i*d
        c = c

        i += 1
if a <= 0:
    print('No')
if c  :
    print('Yes')

Submission status: Runtime Error

Solution code:
N=[int(x) for x in input().split()]
if not N[2]%N[1]==0:
   c=N[2]//N[1]+1
else:
    c=N[2]//N[1]

if not N[0]%N[3]==0:
   c=N[0]//N[3]+1

   d=N[0]//N[3]+1
else:
    d=N[0]//N[3]
if d>=c:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s = int(input())
w = int(input())

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

Submission status: Runtime Error

Solution code:
s = input()
w = input()
print('safe' if s > w else 'unsafe')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input().split(" ")
TL = int(N[0])
TA = int(N[1])
AL = int(N[2])
AA = int(N[3])
a = 0

while a == 0:
  AL = AL - TA
  if AL <= 0:
    a = 1
    break
  TL = TL - AA
  if TL <= 0:
    a = 2
    break
if a == 1:
  print("Yes")
elif a == 2:
  print("No")

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int,input().split())

ans1 = 0
while a>=0:
    a -= d
    ans1 += 1

ans2 = 0
while c >= 0:
    c -= b
    ans2 += 1

if ans1 >= ans2:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s, w = list(map(int, input(split()))

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

Submission status: Runtime Error

Solution code:
a,b,c,d = input('').split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
while 1:
	c=c-b
	if c<=0:
		print('Yes')
		break
	a=a-d
	if a<=0:
		print('No')
		break

Submission status: Runtime Error

Solution code:
s = int(input())
w = int(input())
if w >= s:
    print("unsafe")
else:
    print("safe")

Submission status: Runtime Error

Solution code:
n=int(input())

mydic={"",0}

for i in range(n):
    a=input()
    mydic.update(a)

#print(mydic)
print(len(mydic)-2)

Submission status: Runtime Error

Solution code:
# a:高橋 体力
# b:高橋 攻撃力
# c:青木　体力
# d:青木　攻撃力

a,b,c,d = map(int, input().split())

while c > 0:
  c = c-b　#青木体力
  if c <= 0:
    print("Yes")
  a = a-d
  if a <= 0:
    print("No")

Submission status: Runtime Error

Solution code:

class Main:

    def main(s1,s2):
        if s1 <= s2:
            print("unsafe");
        else:
            print("safe");
    main()

Submission status: Runtime Error

Solution code:
a,b,c,d = input('').split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
while true:
	c=c-b
	if c<=0:
		print('Yes')
		break
	a=a-d
	if a<=0:
		print('No')
		break

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = input()
w = input()

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

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int,input().split())


if -(-c // b) <= -(-a // d):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()

count = 0
if  len(s) < 4:
    print(0)
else:
    for i in range(len(s) -4 + 1):
        for j in range(len(s) - 4 + 1 - i):
#             print(i, j + 4, s[i : j + 4 + i])
            if int(s[i : j + 4 + i]) % 2019 == 0:
                count+=1
#                 print(s[i : j + 4 + i])
    print(count)

Submission status: Runtime Error

Solution code:
S = int(input())
W = int(input())
if W >= S:
    print("unsafe")
else:
    print("safe")

Submission status: Runtime Error

Solution code:
S = input()
W = input()

if int(S) <= int(W):
  print('unsafe')
elif int(S) > int(W):
  print('safe')

Submission status: Runtime Error

Solution code:
import collections
N = int(input())
S = [input() for i in range(N)]
print(len(collections.Counter(S)))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = [str(input()) for i in range(N)]
print(len(set(S)))

Submission status: Runtime Error

Solution code:
import sys
N = int(sys.stdin.readline())
list = []
for i in range(N):
  S = sys.stdin.readline()
  if S not in list:
    list.append(S)
print(len(list))

Submission status: Runtime Error

Solution code:
N=int(input())
lis=[]
ans=0
for i in range(N):
	x=input()
	try:
		y=lis.index(x)
	except:
		lis+=[x]
		ans+=1
print(ans)

Submission status: Runtime Error

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

if s < w
    out = 'unsafe'
else:
    out = 'safe'

print(out)

Submission status: Runtime Error

Solution code:
s = int(input("S: "))
w = int(input("W: "))
if s >= w:
  print("unsafe")
else:
  print("safe")

Submission status: Runtime Error

Solution code:
S, W = map(input().split())
if S/2 <= W: 
    print("unsafe")
else:
    print("safe")

Submission status: Runtime Error

Solution code:
def main():
    s = int(input.split());
    if s[1] <= s[2]:
        print("unsafe");
    else:
        print("safe");
main()

Submission status: Runtime Error

Solution code:
S = str(input())
N = len(S)

counter = 0
for i in range(N-3):
    for j in  range(i+3,N):
        s = int(S[i:j+1])
        m = s % 2019
        if m == 0:
            counter += 1

print(counter)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
W:int
S:int

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

Submission status: Runtime Error

Solution code:
s,w = int(input())
if s>w:
  print("safe")
else:
  print("unsafe")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int, input().split())


n = c // b
m = c % b

if m != 0:

    if a - n * d <= 0 | a - (n-1) * d <= 0:
        print('No')

    else:
        print('Yes')


if m == 0:
    if a - (n-2) * d <= 0 | a - (n-1) * d <= 0:
        print('No')

    else:
        print('Yes')

Submission status: Runtime Error

Solution code:
s = input()
ans = 0
for i in range(len(s)-1):
    for j in range(i+1,len(s)):
        #print(i,j)
        num = int(s[i:j+1])

        if num % 2019 == 0:
            print(i,j, num)
            ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
S =int(input())
W =int(input())

if (S <= W) and 0 <= S,W <= 100: 
    print('unsafe')
else:
    print('safe')

Submission status: Runtime Error

Solution code:
s,w = int(input())
if s>w:
  print("safe")
else:
  print("unsafe)

Submission status: Runtime Error

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

if s < w
    out = 'unsafe'
else
    out = 'safe'

print(out)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
tmp = input().split()
N = int(tmp[0])

ListG = []

for i in range(N):
    Si = input().split()
    p = Si in ListG
    if not p :
        ListG.append(Si)
    
print(len(ListG))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main(){
  int S,W;
  cin >>S >>W;
  
  if(S/2<=W){cout << "unsafe" << endl;}  
  else{cout << "safe" << endl;}
}

Submission status: Runtime Error

Solution code:
s, w = int(input())
if w >= s:
    print("unsafe")
else:
    print("safe")

Submission status: Runtime Error

Solution code:
a , b , c , d = input().split()

a=int(a)
b=int(b)
c=int(c)
d=int(d)

while True:
  c -= b
  if c <= 0:
    print('Yes')
    break
  a -= d
  if a <= 0:
    print('No')
    break

Submission status: Runtime Error

Solution code:
N = int(input())
S = [input() for i in range(N)]
a = set(S)
print(len(a))

Submission status: Runtime Error

Solution code:
import collections
n=int(input())
string_list=[input() for i in range(n)]
c = collections.Counter(string_list)
print(len(c))

Submission status: Runtime Error

Solution code:
from sys import stdin
input = stdin.readline

import sys

A, B, C, D= map(int, input().split())

if C - B <= 0:
    print("yes")
    sys.exit()
elif A - D <= 0:
    print("No")
    sys.exit()

aoki = C - B
taka = A - D

for i in range(1000):
    aoki -= B
    if aoki <= 0:
        print("Yes")
        break
    
    taka -= D
    if taka <= 0:
        print("No")
        break

Submission status: Runtime Error

Solution code:
S =int(input())
W =int(input())

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

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
for i in range(100):
    c-=b
    if c<=0:
        print("Yes")
        break
    else:
        a-=d
        if a<=0:
            print("No")
            break

Submission status: Runtime Error

Solution code:
A,B,C,D = map(int,input().split())
#print(A,B,C,D)
def judge(A,B,C,D):
    while(True):
        C = C-B
        A = A - D
        if C<=0:
            return 1
            break
        elif A<=0:
            return 0
            break
if judge(A,B,C,D)==1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s = input()
w = input()
if w >= s:
  print('unsafe')
else:
  print('safe')

Submission status: Runtime Error

Solution code:
	s, w = map(int,input().split())
if w >= s:
    print('un',end='')
print('safe')

Submission status: Runtime Error

Solution code:
A, B, C, D = map(int, input().split())
count = 0
while True:
    if count % 2 == 0:
        C -= B
    else:
        A -= D
    count += 1
    if A <= 0:
        print("No")
        break
    elif C <= 0:
        print("Yes")
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S,W = int(input().split())

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

Submission status: Runtime Error

Solution code:
S = int(input())
W = int(input())
if W < S:
  print("safe")
else:
  print("unsafe")

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a <= b:
    print('unsafe')
elif:
    print('safe')

Submission status: Runtime Error

Solution code:
N = int(input())
li = []
count = 0
for n in range(N):
    i = input()
    if i in li:
        pass
    else:
        li.append(i)
        count+=1
print(count)

Submission status: Runtime Error

Solution code:
list = input().split()
a = int(list[0])#体力
b = int(list[1]) #攻撃力
c = int(list[2])#体力
d = int(list[3])#攻撃力

#最初
while c>0 and a>0:
    c = c - b
    if c <= 0:
        print("Yes")
        break
    else:
        pass

    a = a -d
    if a<= 0:
        print("No")
        break
    else:
        pass

Submission status: Runtime Error

Solution code:
S W
if W>=(S/2):
  print('safe')
else:
  print('unsafe')

Submission status: Runtime Error

Solution code:
input().split()
s = int(a[0])
w = int(a[1])
 
if w >= s:
    print('unsafe')
else:
    print('safe')

Submission status: Runtime Error

Solution code:
A,B,C,D=map(int,input().split())
t=0
while A>0 and C>0:
  if t%2==0:
    A-=D
  else:
    C-=B
  t+=1
if A<=0:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int,input().split())
for i in range(100):
    if c-b <= 0:
        print("yes")
        break
    elif  a-d <= 0:
        print("No")
        break
    else:
        a = a-d
        c = c-b

Submission status: Runtime Error

Solution code:
sheep_number=S
wolf_number=W
if sheep_number<=wolf_number:
    print('unsafe')
else:
    print('safe')

Submission status: Runtime Error

Solution code:
n = int(input())
items = set([])
count = 0
for i in range(n):
    item = input()
    if item not in items:
        items.add(item)
        count += 1
    else:
        pass
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
 input().split()
s = int(a[0])
w = int(a[1])
 
if w >= s:
    print('unsafe')
else:
    print('safe')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = int(input())
w = int(input())
if (s < w or s == w):
    print("unsafe")
else:
    print("safe")

Submission status: Runtime Error

Solution code:

A, B, C, D = map(int, input().split())

Thit = A
Tatk = B
Ahit = C
Aatk = D
win = False

while Thit <= 0 or Ahit <= 0:
    Ahit = Ahit - Tatk
    if Ahit <= 0:
        win = True
        break
    Thit = Thit - Aatk
    if Thit <= 0:
        break

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = int(input())
w = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
li = str.split()
if(eval(li[0])<=eval(li[1])):
  print("unsafe")
else:
  print("safe")

Submission status: Runtime Error

Solution code:
A,B,C,D = map(int,input().split())
while True:
  C = C - B
  if C <= 0:
    break
  A = A - D
  if A <= 0:
    break
print('Yes' if A >= C else 'No')

Submission status: Runtime Error

Solution code:
def compare():
  S=int(input())
  W=int(input())
  if S<=W:
    print("unsafe")
  else:
    print("safe")
compare()

Submission status: Runtime Error

Solution code:
A, B, C, D = map(int, input().split())

Thit = A
Tatk = B
Ahit = C
Aatk = D
win = False

while Thit < 0 or Ahit < 0:
    Ahit = Ahit - Tatk
    if Ahit < 0:
        win = True
        break
    Thit = Thit - Aatk
    if Thit < 0:
        break

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

Submission status: Runtime Error

Solution code:
s, w = map(int, input().strip())

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def solve():
    a, b, c, d = map(int, input().split())
    
    x = c / b
    y = a / d


    if c % b == 0 and x - y <= 1:
        return 'Yes'
        

    return 'Yes' if x < y else 'No'

print(solve())

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = int(input())
W = int(input())

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

Submission status: Runtime Error

Solution code:
N=[int(x) for x in input().split()]
if N[0]/2=>N[1]:
    print("safe")
else:
   print("unsafe")

Submission status: Runtime Error

Solution code:
s = int(input())
w = int(input())
if s == w or s < w:
  print("unsafe")
else:
  print("safe")

Submission status: Runtime Error

Solution code:
if 1 <= W <= 100 and 1 <= S <= 100 and W >= S :
  print ("unsafe")
if 1 <= W <= 100 and 1 <= S <= 100 and W < S :
  print("safe")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=int(input())
w=int(input())
print('unsafe' if w>=s else 'safe')