peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
# A - Sheep and Wolves

s, w = map(int, input().split())
print("unsafe" if w >= s else "safe")
# Judge status: Accepted
import sys
Row = input()
List = [int(j) for j in input().split()]
for i in range(len(List)):
    ans = List[i] % 2
    if ans == 1:
        print(0)
        sys.exit()

count = 0
flg = 0
while flg == 0:
    count = count + 1
    for j in range(len(List)):
        List[j] = List[j] / 2
        if List[j]%2:
            flg = 1
            break
print(count)
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))

count1 = 0
count2 = 0
count4 = 0

for a in A:
    if a % 4 == 0:
        count4 += 1
    elif a % 2 == 0:
        count2 += 1
    else:
        count1 += 1

count4 -= count1
if count2:
    count4 -= 1

if count4 >= -1:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
s=list(map(int,input()))
count=0
k=len(s)-2
i=0
while i<=k:
    if s[i]!=s[i+1]:
        s.remove(s[i])
        s.remove(s[i])
        k-=2
        count+=2
    else:
        i+=1
    
print(count)
# Judge status: Accepted
#! /usr/bin/env python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

A, B, C, K = map(int, readline().split())

print(A - B) if K % 2 == 0 else print(B - A)
# Judge status: Wrong Answer
A,B,C,D,E=map(int,input().split())
print(C*60-A*60-E)
# Judge status: Accepted
X,Y,A,B,C=map(int,input().split())
ls_a=list(map(int,input().split()))
ls_b=list(map(int,input().split()))
ls_c=list(map(int,input().split()))

ls_a.sort(reverse=True)
ls_b.sort(reverse=True)
ls_c.sort(reverse=True)

ls=sorted(ls_a[:X]+ls_b[:Y])
ans=sum(ls)
for i in range(min(X+Y, C)):
    if ls[i] < ls_c[i]:
        ans += ls_c[i] - ls[i]
print(ans)
# Judge status: Wrong Answer
n = int(input())
robots = []
for i in range(n):
    l = input().split()
    x = int(l[0])
    length = int(l[1])
    robots.append((x - length + 1, x + length - 1))

    
robots = sorted(robots, key=lambda x:x[1])
covered_x = robots.pop(0)[1]
robots_num = 1
try:
    while True:
        robots = filter(lambda r: r[0] > covered_x, robots)
        covered_x = next(robots)[1]
        robots_num += 1
except StopIteration:
    pass
print(robots_num)
# Judge status: Wrong Answer
x=int(input())
if x>=2000:
    print(1)
    exit()
else:
    t=x//100
    a=x%100
    if t<=a<=t*5:
        print(1)
    else:
        print(0)
# Judge status: Accepted
N = int(input())

a_list = list(map(int, input().split()))

count = 0
for i in range(0, N, 2):
    if(a_list[i] % 2 == 1):
        count += 1

print(count)
# Judge status: Accepted
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

s = collections.deque(input())
Q = int(input())
for _ in range(Q):
  I = input()
  if len(I) == 1:
    count += 1
  else:
    F = int(I[2])
    C = I[4]
    k = (count + F ) % 2
    if k == 0:
      s.append(C)
    else:
      s.appendleft(C)
if count % 2:
  s.reverse()
for i in s:
  print(i,end = "")
print()
# Judge status: Accepted
n,m,k=map(int,input().split())

for i in range(n+1):
    for g in range(m+1):
        if i*g+(n-i)*(m-g)==k:
            print("Yes")
            exit()
print("No")
# Judge status: Wrong Answer
N, Q = map(int, input().split())
S = input()
B = []
for s in range(len(S)):
    B.append(S[s])
A = []
for q in range(Q):
    l, r = map(int, input().split())
    cnt = 0
    C = []
    C = S[l-1:r]
    for c in range(len(C)-1):
        if C[c] + C[c+1]  == 'AC':
            cnt += 1
    A.append(cnt)
print(A)
# Judge status: Accepted
N,D=map(int,input().split())
c=0
for i in range(N):
  X,Y=map(int,input().split())
  if X**2+Y**2<=D**2:
    c+=1
print(c)
# Judge status: Accepted
a, b = map(int, input().split())

if a <= b:
    ans = ""
    for i in range(b):
        ans += str(a)
    print(ans)
else:
    ans = ""
    for i in range(a):
        ans += str(b)
    print(ans)
# Judge status: Wrong Answer
N, C, K = map(int,input().split())
T = []
ans = 0 #バス内の人数
num = 1 #バスの台数
for i in range(N):
    ans = int(input())
    T.append(ans)
T = sorted(T)
S =  T[0] + K #バスの発車時刻
for i in range(N):
    if T[i] <= S and ans < C:
        ans += 1
    else:
        num += 1
        S = T[i] + K
        ans = 1
print(num - 1)
# Judge status: Accepted
# -*- coding: utf-8 -*-
from sys import stdin, stdout


def read():
    x0 = stdin.readline().rstrip()
    return x0


def __main__():
    n = int(read())
    x = 100
    res = 0

    while x < n:
        x += x // 100
        res += 1

    r = str(res) + '\n'
    stdout.write(r)

    #res = str(m) + '\n'


    #res = str(max(m1, m2)) + '\n'
    #stdout.write(res)

__main__()

#a = [int(i) for i in read().split()]
# Judge status: Accepted
import math

x=int(input())
G=math.gcd(x,360)
L=x*360//G
ans=L//x
print(ans)
# Judge status: Wrong Answer
import collections

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

B = []
cnt = 0
for i in range(N):
    if A[i] >= 3200:
        cnt += 1
    else:
        B.append(A[i]//400)
print(B)
c = collections.Counter(B)

small = len(c) if len(c) != 0 else 1
big = len(c)+cnt

print(small, big)
# Judge status: Wrong Answer
import itertools
import numpy
N, M, Q = map(int,input().split())
abcd = []*Q
d_list = []
sum_d = 0
for _ in range(Q):
  abcd.append(list(map(int,input().split())))

A = [1 for i in range(N)]
for A in itertools.product(range(A[0],M+1),repeat=N):
  for i in range(Q):
    if A[abcd[i][1]-1]-A[abcd[i][0]-1] == abcd[i][2]:
      d_list.append(abcd[i][3])
  if sum_d <= sum(d_list):
    sum_d = sum(d_list)
  d_list.clear()
print(sum_d)
# Judge status: Accepted
def resolve():
    a = list(map(int, input().split()))
    k = int(input())
    a.sort()
    for i in range(k):
        a[2] = a[2] * 2
    print(sum(a))
resolve()
# Judge status: Wrong Answer
N, A, B, C, D = map(int, input().split())
S = input()
def chk(l, r):
    for i in range(l, r-1):
        if S[i:i+2] == "##":
            return 0
    return 1

def chk3(l, r):
    for i in range(l, r):
        if S[i:i+3].count("#") == 0:
            return 1
    return 0

if chk(A, C) and chk(B, D) and (C<D or chk3(B-1, D)):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
a,b,c = map(int,input().split())
if c<a+b:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
S = input()
T = input()

count = 0

for index, c in enumerate(S):
    if T[index] != c:
        count += 1
print(count)
# Judge status: Wrong Answer
from collections import Counter
N=int(input())
A = list(map(int,input().split()))
ans = [0] * N
B = Counter(A)
for i in range(N):
    ans[i] = B[A[i]]-1

total=sum(ans)
C=[]
for i in range(N):
    c = (total-ans[i])//2
    C.append(c)

for num in C:
    print(num)
# Judge status: Accepted
def win_cou(n,m):
    cou = 0
    while m > n:
        n = n * 2
        cou = cou + 1
    return cou*(-1)



Input = input().split()
N = int(Input[0])
K = int(Input[1])
rate = 0

for i in range(N):
    rate = rate + (2 ** win_cou(i+1,K)) / N

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

stdin = open(0)
N = [int(x) for x in stdin.read().rstrip()]


def solve(N):
    L = len(N)
    # n円の場合、n+1円の場合
    dp = 0, 1
    for n in N:
        a = min(dp[0] + n, dp[1] + 10 - n)
        b = min(dp[0] + n + 1, dp[1] + 10 - (n + 1))
        dp = a, b
    return dp[0]


print(solve(N))
# Judge status: Wrong Answer
N, T = map(int, input().split())
c, t = map(int, input().split())
ans = 1001
for i in range(N):
    if T > t and c < ans:
        ans = c

if ans == 1000:
    print("TLE")
else:
    print(ans)
# Judge status: Accepted
def resolve():
    import itertools
    import math
    n = int(input())
    a = tuple(map(int, input().split()))
    b = tuple(map(int, input().split()))
    alist = list(itertools.permutations(sorted(a)))
    for i in range(math.factorial(n)):
        if alist[i] == a:
            numa = i+1
        if alist[i] ==b:
            numb = i+1
    print(abs(numa-numb))
resolve()
# Judge status: Accepted
H,W=map(int,input().split())
if H==1 or W==1:
  print(1)
else:
  print(H*W//2 if H*W%2==0 else H*W//2+1)
# Judge status: Wrong Answer
N = int(input())

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return len(lower_divisors + upper_divisors[::-1])

ans = 0
for i in range(1, N+1):
    # print(i , make_divisors(i))
    ans += i * make_divisors(i)
# Judge status: Wrong Answer
A = list(map(int,input().split()))
if sum(A)>22:
  print('bust')
else:
  print('win')
# Judge status: Accepted
S = input()
out = '2018' + S[4:]
print(out)
# Judge status: Wrong Answer
n=int(input())
import math
nn=int(n/2)
a=[1]
a*=(n+1)
for i in range(2,nn+1):
    t=i
    while t<=n:
        a[t]+=1
        t+=i
for i in range(nn+1,n+1):
    a[i]+=1
ans=0
for i in range(1,n+1):
    ans+=a[i]*i

print(ans)
# Judge status: Accepted
a,b = map(int, input().split())

if a > b:
  print(a-1)
else:
  print(a)
# Judge status: Accepted
li = list(map(int,input().split()))
if sum(li) != 17 or max(li) != 7 or min(li) != 5:
  print("NO")
  exit()
print("YES")
# Judge status: Accepted
n = int(input())
l1 = list(map(int,input().split()))
l2 = list(map(int,input().split()))
ans = 0
for i in range(n):
#  print(l1[:i+1],l2[i:n])
#  print("ans:"+ str(sum(l1[:i+1]) + sum(l2[i:n])))
  ans = max(ans, sum(l1[:i+1]) + sum(l2[i:n]))
print(ans)
# Judge status: Accepted
s = input()
t = list(reversed(s))
ans = 0
for i in range(len(s)):
    if s[i] != t[i]:
        ans += 1
ans = (ans+1) // 2
print(ans)
# Judge status: Accepted
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    q, h, s, d = map(int, input().split())
    N = int(input())

    h = min(h, q*2)
    s = min(s, h*2)
    d = min(d, s*2)
    print(d * (N//2) + s * (N%2))


if __name__ == '__main__':
    main()
# Judge status: Accepted
a=int(input())
print(a+a*a+a*a*a)
# Judge status: Wrong Answer
N = int(input())
x = [list(map(int, input().split())) for i in range(N)]
ans = 0
for i in range(N):
  a = x[N-i-1][0]
  b = x[N-i-1][1]
  c = b - (a % b)
  if ans <= c:
    ans = c
  else:
    n = (ans - c) // b
    if (ans - c) % b == 0:
      ans = (n)*b + c
    else:
      ans = (n+1)*b + c
print(ans)
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
A.append(0)
m=1000
kabu=0
for i in range(N):
  if A[i]>A[i+1]:
    m+=A[i]*kabu
    kabu=0
  if A[i]<A[i+1]:
    kabu+=m//A[i]
    m-=A[i]*(m//A[i])
    
print(m)
# Judge status: Accepted
#  --*-coding:utf-8-*--

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

lastA = None
for a in A:
    if a == lastA:
        print('NO')
        break
    
    lastA = a
else:
    print('YES')
# Judge status: Wrong Answer
a,b=map(int,input().split())
if a<b:
    print(a)
else:
    print(b)
# Judge status: Accepted
import sys
from time import time
import random

input = sys.stdin.readline
D = int(input())
C = [int(c) for c in input().split()]
S = [[int(s) for s in input().split()] for _ in range(D)] 

def solve():
    start = time()

    Ans = [int(i) % 26 + 1 for i in range(D)]
    print(*Ans, sep="\n") 
   
    return 0

if __name__ == "__main__":
    solve()
# Judge status: Wrong Answer
N = int(input())
T,A=map(int,input().split())
H = list(map(int,input().split()))
minn = 10**5
min_num=0

for i in range(len(H)):
    if abs(A-(12-H[i]*0.006))<=minn:
        minn = abs(A-(12-H[i]*0.006))
        min_num = i+1
print(min_num)
# Judge status: Wrong Answer
#48
N = int(input())
h = list(map(int,input().split()))
move = 0
move_max = 0
num = 0

for i in range(1,N):
    if h[i-1] >= h[i]:
        num += 1
    else:
        if move < num:
            move = num
            num = 0
if move < num:
    move = num
        
print(move)
# Judge status: Accepted
from collections import defaultdict
def main():
    dd = defaultdict(int)
    dd["a"]=0;
    dd["b"]=0;
    dd["c"]=0;
    s = input()
    for i in range(len(s)):
        dd[s[i]]+=1 
    
    res = list(dd.values())
    if max(res)-min(res)>1:
        print("NO")
    else:
        print("YES")

if __name__ == "__main__":
    main()
# Judge status: Accepted
A, B = map(int, input().split())

if A + B >= 24:
    print(A + B - 24)
else:
    print(A + B)
# Judge status: Accepted
n = int(input())
i, a, b = 2, 2, 1
ans = 0
if n==1:
  print(1)
  quit()
while i <= n:
  ans = a + b
  a,b = b, ans
  i += 1
print(ans)
# Judge status: Accepted
A, B = map(int, input().split())

x = max((A*100+7)//8, B*100//10)
y = min((A+1)*100/8, (B+1)*100/10)

if x < y:
    ans = x
else:
    ans = -1

print(ans)
# Judge status: Accepted
S = input()

lst = [1 if S[0]=='<' else -1]
for i in range(1, len(S)):
    if S[i] == S[i - 1]:
        lst[-1] += 1 if S[i]=='<' else -1
    else:
        lst.append(-1 if S[i]=='>' else 1)
        
ans = [0]

for i in lst:
    if i > 0:
        ans += list(range(1,i+1))
    else:
        ans[-1] = max(ans[-1], -i)
        ans += list(range(-i-1,-1, -1))


print(sum(ans))
# Judge status: Wrong Answer
n = int(input())
a = [int(i) for i in input().split()]
out = [0] * n
for i in range(len(a)): out[a[i] - 1] = i
print(out)
# Judge status: Wrong Answer
import itertools

n = int(input())
l_list = [int(x) for x in input().split()]
count = 0
result = []

all = list(itertools.permutations(l_list, 3))

for i in set(all):
    if i[0] < i[1] < i[2]:
        result.append(i)

print(result)
# Judge status: Wrong Answer
N = int(input())
L = list(map(int, input().split()))
lmax = max(L)
suml = 0
for i in L:
    if i != lmax:
        suml += i

if lmax < suml:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
s = input()
s = s.replace('><','> <')
k = list(s.split())
c = 0
for v in k:
  r = len(v)
  g = 0
  if '<>' in v:
    f = v.find('<>')
    mi = min(f+1,r-f-1)
    ma = max(f+1,r-f-1)
    c += (ma*(ma+1)//2) + (mi*(mi-1)//2)
  elif '<' in v:
    c += r
  else:
    c += r
print(c)
# Judge status: Accepted
N,A,B = (int(x) for x in input().split())
if N == 1:
    if A != B:
        print('0')
    else:
        print('1')
elif A > B:
    print('0')
elif A == B:
    print('1')
else:
    print((N-2)*(B-A)+1)
# Judge status: Wrong Answer
from bisect import bisect_left
import heapq
n = int(input())
x = [int(input())]
heapq.heapify(x)
for _ in range(n-1):
  a = int(input())
  if a <= x[0]:
    heapq.heappush(x, a)
  else:
    x.pop(bisect_left(x, a)-1)
    heapq.heappush(x, a)
print(len(x))
# Judge status: Accepted
sa = input()
sb = input()
for ca, cb in zip(sa, sb):
	print(ca, cb, sep='', end='')
if len(sa) != len(sb):
	print(sa[-1])
# Judge status: Accepted
W, H, N = map(int, input().split())
left, right = 0, W
down, up = 0, H

for i in range(N):
  x, y, a = map(int, input().split())
  if a == 1:
    left = max(left, x)
  elif a == 2:
    right = min(right, x)
  elif a == 3:
    down = max(down, y)
  else:
    up = min(up, y)
    
w, h = 0, 0
if right-left > 0:
  w = right - left
if up-down > 0:
  h = up-down
ans = w * h
print(ans)
# Judge status: Accepted
from fractions import gcd
N=int(input())
A=list(map(int,input().split()))
Asorted = sorted(A)[:: -1]


L=[0]*N
R=[0]*N
L[0]=A[0]
R[0]=A[N-1]

for n in range(1,N):
  L[n]=gcd(A[n],L[n-1])
  R[n]=gcd(A[N-n-1],R[n-1])
  
  ans=max(L[N-2],R[N-2])

for i in range(1,N-1):
  ans=max(ans,gcd(L[i-1],R[N-i-2]))

print(ans)
# Judge status: Accepted
c=input()
d=input()
if c==d[::-1]:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
s=input()
n=len(s)
def han(s):
    return s==s[::-1]
if han(s):
    if han(s[:(n-1)//2]):
        if han(s[(n+1)//2:]):
            print('Yes')
            exit()
print('No')
# Judge status: Accepted
from itertools import permutations
n=int(input())
p=[]
for i in range(1,n+1):
    p.append(i)
a=list(map(int,input().split()))
b=list(map(int,input().split()))
perm=list(permutations(p))
for i in perm:
    if a==list(i):
        res=perm.index(i)
    if b==list(i):
        temp=perm.index(i)
print(abs(res-temp))
# Judge status: Accepted
import numpy as np
N, W = map(int, input().split())

dp=np.zeros((N+1, W+1), dtype=np.int64)

for i in range(1,N+1):
    w, v =list(map(int, input().split()))
    dp[i]=dp[i-1]
    dp[i][w:]=np.maximum(dp[i-1][:W-w+1]+v, dp[i-1][w:])
print(np.max(dp))
# Judge status: Wrong Answer
n = int(input())
print(n, 0, 1, 1, 0, 0)
# Judge status: Accepted
s = input()
k = int(input())

if s[:k].count('1') == len(s[:k]):
    print(1)
else:
    for c in s:
        if c != '1':
            print(c)
            exit()
# Judge status: Wrong Answer
n,x=map(int,input().split())
l=list(map(int,input().split()))
minl=[]
for i in range(1,n):
    if x>l[i-1] and x<l[i]:
        minl.append(min(abs(x-l[i-1]),abs(l[i]-x)))
    else:
        minl.append(abs(l[i]-l[i-1]))
if n==1:
    print(l[0]-x)
else:
    print(min(minl))
# Judge status: Accepted
N=int(input())
H=list(map(int,input().split()))
for i in range(N-1):
    if H[i]>H[i+1]+1:
        print("No")
        break
    elif H[i]==H[i+1]+1:
        H[i]-=1
        H[i+1]+=1
else:
    print("Yes")
# Judge status: Wrong Answer
s = input()
print('YES' if s[:3] == 'key' and s[-4:] == 'ence' else 'NO')
# Judge status: Accepted
n,k,q = map(int,input().split())
tokuten = [(k-q) for i in range(n+1)]
tokuten[0]=0
for i in range(q):
    a = int(input())
    tokuten[a]+=1
for i in range(1,n+1):
    if tokuten[i]>0:
        print('Yes')
    else:
        print('No')
# Judge status: Wrong Answer
a = int(input())
if a >= 30:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
a, b = map(int,input().split())
ans = 0
for i in range(a+1, b):
    if str(i) == str(i)[::-1]:
        ans += 1
print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
ans = b // a
if ans >= c:
    ans = c
print(ans)
# Judge status: Accepted
a,b = map(int,input().split())

if a > b:
    print(a-1)
else:
    print(a)
# Judge status: Wrong Answer
S=input()
N=len(S)+1
l=[0]*N
for i in range(N-1):
    if S[i]=="<":
        l[i+1]=l[i]+1
print(l)
for i in range(N-2,-1,-1):
    if S[i]==">":
        l[i]=max(l[i+1]+1,l[i])
print(sum(l))
print(l)
# Judge status: Accepted
import collections
N = int(input())
A = list(map(int,input().split()))

K = collections.Counter(A)
B = len(K)

if N == len(K):
    print("YES")
else:
    print("NO")
# Judge status: Accepted
N = list(input())

print("Yes" if "9" in N else "No")
# Judge status: Wrong Answer
N, D = [int(n) for n in input().split()]
print((N-1)//(2*D) + 1)
# Judge status: Accepted
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

sm = sum(A)
for i in range(N):
    if B[i] >= A[i] + A[i + 1]:
        A[i] = A[i + 1] = 0
    elif B[i] >= A[i]:
        A[i + 1] -= B[i] - A[i]
        A[i] = 0
    else:
        A[i] -= B[i]

print(sm - sum(A))
# Judge status: Wrong Answer
N = int(input())
S = set()
for i in range(N):
  S.add(i)
print(len(S))
# Judge status: Accepted
from math import floor
from fractions import Fraction
a, b = input().split()
a = int(a)
b = Fraction(b)
print(floor(a * b))
# Judge status: Accepted
N, A, B, C, D = map(int, input().split())
S = 'x' + input()
mx = D if D > C else C
if '##' in S[A:mx]:
    print('No')
    exit()
if C > D:
    if '...' in S[B-1:D+2]:
        print("Yes")
    else:
        print("No")
else:
    print("Yes")
# Judge status: Wrong Answer
a,b,c = map(int,input().split())

if a <= c <= b:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
H,W = map(int,input().split())
print('Yes') if H == W else print('No')
# Judge status: Accepted
from math import gcd
n=int(input())
l=1
for _ in range(n):
  t=int(input())
  l=l//gcd(l,t)*t
print(l)
# Judge status: Accepted
N = int(input())
S = input()

x = 0
max_x = 0
for s in S:
  if (s == 'I'):
    x += 1
  elif (s == 'D'):
    x -= 1
  
  if (max_x < x):
    max_x = x

print(max_x)
# Judge status: Accepted
import sys
readline = sys.stdin.buffer.readline
a,b,c = map(int,readline().split())

if a == 5 and (b==5 or c==5):
    if b==7 or c==7:
        print("YES")
    else:
        print("NO")
elif a == 7 and (b==5 and c==5):
    print("YES")
else:
    print("NO")
# Judge status: Accepted
# 入力 : 数字3つ
A, B, X = map(int, input().split())

if A <= X <= (A+B) :
    print("YES")
else :
    print("NO")
# Judge status: Accepted
inputs = list(map(int, input().split()))

former = 60 * inputs[0] + inputs[1]
latter = 60 * inputs[2] + inputs[3]

study_time = latter - inputs[4] - former

print(study_time)
# Judge status: Wrong Answer
n = int(input())
l = list(map(int,input().split()))
l.sort()
count = 0
for i in range(len(l)):
    for j in range(i+1,len(l)):
        for k in range(j+1,len(l)):
            if (l[i] < (l[j] + l[k])) & (l[j] < (l[i] + l[k])) & (l[k] < (l[i] + l[j])):
                print(l[i],l[j],l[k])
                count += 1
print(count)
# Judge status: Wrong Answer
n,k,q =map(int,input().split())
ans=[0]*n
for i in range(q):
    a=int(input())
    ans[a-1]+=1
for i in range(n):
    if 0< ans[i]<=q-k and q-k>0:
        print("No")
    else:
        print("Yes")
# Judge status: Accepted
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    N=int(readline())
    A=list(map(int,readline().split()))

    B=sorted(A)
    left=B[N//2-1]
    right=B[N//2]

    for i in range(N):
        if A[i]<=left:
            print(right)
        else:
            print(left)

if __name__=="__main__":
    main()
# Judge status: Accepted
try:
  r, g, b = map(int, input().split())
  print('YES' if (r*100+10*g+b) % 4 == 0 else 'NO')
except EOFError:
  pass
# Judge status: Accepted
n,m=map(int,input().split())
num=[0]*n
wa=0
ac=0
for i in range(m):
    p,s=input().split()
    p=int(p)
    if s=="WA" and num[p-1]!=-1:
        num[p-1]+=1
    elif s=="AC" and num[p-1]!=-1:
        ac+=1
        wa+=num[p-1]
        num[p-1]=-1
print(ac,wa)
# Judge status: Wrong Answer
A = list(map(int, input().split()))

if A[0] == A[1] != A[2] or A[0] != A[1] == A[2] or A[0] == A[2] != A[1]:
  print("Yes")
elif A[0] == A[1] == A[2]:
  print("No")
# Judge status: Wrong Answer
N,A,B=map(int,input().split())
if (B-A)%2==1:
   a=min(A-1,N-B)+1
   b=(B-A)-1//2
   print(a+b)

elif (B-A)%2==0:
   print((B-A)//2)
# Judge status: Accepted
n,y=map(int,input().split())

for i in range(n+1):
    for j in range(n-i+1):
        if 10000*i + 5000*j + 1000*(n-i-j)==y:
            print(i,j,n-i-j)
            exit()

print("-1 -1 -1")
# Judge status: Wrong Answer
import collections
 
n,m = map(int,raw_input().split(' '))
print n - sum(map(int,raw_input().split(' ')) or [0])
# Judge status: Accepted
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

def solve():
    n = int(input())
    ans = 0
    for i in range(1, n+1):
        if len(make_divisors(i)) == 8 and i%2 == 1:
            ans += 1
    
    print(ans)

if __name__ == "__main__":
    solve()
# Judge status: Accepted
# A
a = int(input())
b = int(input())
h = int(input())

S = (a+b)*h//2
print(S)
# Judge status: Accepted
N = int(input())
W = list(map(int,input().split()))

res = 10**10

for i in range(1,N):
    tmp1 = W[:i]# + W[i:]
    tmp2 = W[i:]

    sum_tmp1 = sum(tmp1)
    sum_tmp2 = sum(tmp2)

    ans = abs(sum_tmp1 - sum_tmp2)

    if(ans < res):
        res = ans
print(res)
# Judge status: Accepted
a, b, k = map(int, input().split())

l = []
for i in range(1, 101):
    if a%i == 0 and b%i == 0:
        l.append(i)
    else:
        continue
        
print(l[len(l)-k])