AtCoder Beginner Contest 164 - Sheep and Wolves

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-----
4 5

-----Sample Output-----
unsafe

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

Source: atcoder | Difficulty: EASY


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


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


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, bisect
import sys
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
stdin = sys.stdin
ni = lambda : int(ns())
nf = lambda : float(ns())
na = lambda : list(map(int, stdin.readline().split()))
nb = lambda : list(map(float, stdin.readline().split()))
ns = lambda : stdin.readline().rstrip()
(S, W) = na()
print('unsafe') if W >= S else print('safe')


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


(S, W) = map(int, input().split())
print(['safe', 'unsafe'][S <= W])


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


(x, y) = map(int, input().split())
print('safe' if x > y else 'unsafe')


(A, B) = map(int, input().split())
print('safe') if A > B else print('unsafe')


s = list(map(int, input().split()))
print('safe' if s[0] > s[1] else 'unsafe')


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


(s, w) = [int(x) for x in input().split()]
print(['unsafe', 'safe'][w < s])


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


(S, W) = map(int, input().split())
print(('un' if S <= W else '') + 'safe')


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


(a, b) = map(int, input().split())
print(['safe', 'unsafe'][a <= b])


(s, w) = list(map(int, input().split()))
print(['unsafe', 'safe'][int(s > w)])


(N, M) = map(int, input().split())
print(['safe', 'unsafe'][N <= M])


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


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


(S, W) = [int(v) for v in input().split()]
print('unsafe' if W >= S else 'safe')


nums = [int(e) for e in input().split()]
Sheep = nums[0]
Wolves = nums[1]
if Sheep > Wolves:
	print('safe')
else:
	print('unsafe')


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


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


(s, w) = map(int, input().split())
print('unsafe'[2 * (s > w):])


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


def main() -> None:
	(s, w) = list(map(int, input().split()))
	print('unsafe' if s <= w else 'safe')
	return

def __starting_point():
	main()
__starting_point()


(s, w) = map(int, input().split())
print('un' * (s <= w) + 'safe')


a = [int(i) for i in input().split()]
print('safe' if a[0] > a[1] else 'unsafe')


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


(n, m) = map(int, input().split())
print('unsafe' if m >= n else 'safe')


(s, w) = map(int, input().split())
print('unsafe' if w >= s else 'safe')
exit(0)


(S, W) = map(int, input().split())
print('suanfsea f e'[S <= W::2])


a = list(map(int, input().split()))
print('un' * (a[0] <= a[1]) + 'safe')


(a, b) = map(int, input().split())
print(a > b and 'safe' or 'unsafe')


(S, W) = map(int, input().split())
print('un' * (S <= W) + 'safe')


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


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


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


(a, b) = (int(x) for x in input().split())
print('safe' if a > b else 'unsafe')


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


print(['safe', 'unsafe'][eval(input().replace(' ', '<='))])


(n, s) = map(int, input().split())
print('safe') if n > s else print('unsafe')


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


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


(s, w) = map(int, input().split())
print(('un' if w >= s else '') + 'safe')


(N, K) = map(int, input().split())
print('unsafe' if K >= N else 'safe')


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


(S, W) = [int(i) for i in input().split()]
print(['safe', 'unsafe'][W >= S])


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


(s, w) = list(map(int, input().split()))
a = ''
if s <= w:
	a = 'un'
print(a + 'safe')


(n, k) = map(int, input().split())
print('unsafe' if n <= k else 'safe')


print('safe' if eval(input().replace(' ', '>')) else 'unsafe')


import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp
INF = inf
MOD = 1000000007
(s, w) = [int(i) for i in input().split()]
tmp = 0
res = 'safe'
if w >= s:
	res = 'unsafe'
print(res)


(sheep, wolves) = map(int, input().split())
if sheep > wolves:
	print('safe')
elif sheep <= wolves:
	print('unsafe')


number = input().split(' ')
S = int(number[0])
W = int(number[1])
if S > W:
	print('safe')
else:
	print('unsafe')


(good, bad) = map(int, input().split())
print('safe' if good > bad else 'unsafe')