peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
#!/usr/bin/env python3
from itertools import product

def f(x):
    b = sum(range(100,106))
    return x % b

def g(r):
    l = list(range(100,106))
    p = product([0,1],repeat=5)
    m = []
    for x in p:
        s = 0
        for i in range(5):
            s += l[i]*x[i]
        m.append(s)
    return r in m

def main():
    X = int(input())
    print(int(g(f(X))))

if __name__ == '__main__':
    main()
# Judge status: Accepted
a, b, c = map(int, input().split())
if a + b >= c:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
def main():
    width, height, target = map(int, input().split())
    answer = False
    if target == 0:
        answer = True
    else:
        for i in range(height):
            if answer:
                break
            for j in range(width):
                if (width - j) * (height - i) + i * j == target:
                    answer = True
                    break
    print("Yes" if answer else "No")


if __name__ == '__main__':
    main()
# Judge status: Accepted
def main():
  num = list(map(int,input().split()))
  flg=0
  if num[0]>num[1]:
    print(num[0]*2-1)
  elif num[1]>num[0]:
    print(num[1]*2-1)
  else:
    print(num[0]*2)
main()
# Judge status: Accepted
a,b,c=map(int,input().split())

print('YES' if b-a==c-b else 'NO')
# Judge status: Wrong Answer
A, B = map(float, input().split())
C = str(A * B)
if '.' in C:
    ans = C.split('.')
    print(ans[0])
else:
    print(C)
# Judge status: Accepted
x=int(input())

if x==0:
    print(1)
else:
    print(0)
# Judge status: Accepted
import sys

X = int(input())

# X = 33

for a in range(-118, 120):
    for b in range(-119, 119):
        if a**5 - b**5 == X:
            print(a, b)
            sys.exit(0)
# Judge status: Wrong Answer
n = int(input())
a = sum(list(map(int,input().split())))
b = sum(list(map(int,input().split())))
if (a - b) % 2 == 0 and a != b:
	print("No")
else:
	print("Yes")
# Judge status: Wrong Answer
a = [[j for j in map(int,input().split())] for i in range(3)]
n = int(input())
b = [[int(j) for j in input()] for i in range(n)]

for i in range(3):
    for j in range(3):
        for k in range(n):
            if a[i][j] == b[k]:
                a[i][j] = 0

if sum(a[0]) % 3 == 0 or sum(a[1]) % 3== 0 or sum(a[2]) % 3 == 0:
    print('Yes')
elif (a[0][0] + a[1][1] + a[2][2]) % 3 == 0 or (a[0][2] + a[1][1] + a[2][0]) % 3 == 0:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
N, D = map(int, input().split())

X = [input().split() for i in range(N)]

count = 0
d_2 = 0
d = 0

for i in range(N):
    for j in range(0, i):
        for k in range(D):
            d_2 += (float(X[i][k]) - float(X[j][k]))**2
        d = d_2**(1/2)
        if d.is_integer() == True:
            count += 1

print("{}".format(count))
# Judge status: Wrong Answer
n,m=map(int,input().split())
if(n+m>=2):

    print((n*(n-1)/2)+(m*(m-1)/2))
# Judge status: Wrong Answer
from collections import Counter
def solve():
  N = int(input())
  A = list(map(int, input().split()))
  c = Counter(A)
  B = sorted([k for k,v in c.items() if v>=2],reverse=True)
  if len(B)<2:
    return 0
  ans = B[0]*B[1]
  return ans
print(solve())
# Judge status: Wrong Answer
N = int(input())
count = 0
lst = []
while N > 0:
  lst.append(N%10)
  N //= 10 
for i in lst:
  count += i
if count % 9 == 0:
  print("Yes")
else:
  print("No")
print(count)
# Judge status: Wrong Answer
n = int(input())
print((n*n-1)//2)
# Judge status: Accepted
from collections import Counter
n = int(input())
ctr = Counter(list(map(int, input().split())))
side = []
for k in sorted(ctr.keys(), reverse=True):
    if ctr[k] >= 4:
        side.append(k)
        side.append(k)
    elif ctr[k] >= 2:
        side.append(k)
print(side[0] * side[1] if len(side) >= 2 else 0)
# Judge status: Accepted
s = input()
w = ['Sunny','Cloudy','Rainy']
if w.index(s) == 2:
    print(w[0])
else:
    print(w[w.index(s)+1])
# Judge status: Wrong Answer
O = input()
E = input()
print(*[o + e for o, e in zip(O, E)], sep="")
# Judge status: Accepted
a, b = map(int, input().split())
if (a - b) % 2 == 0:
    print((a + b) // 2)
else:
    print('IMPOSSIBLE')
# Judge status: Wrong Answer
# 解答見た

n = int(input())

a = [[0 for i in range(10)] for j in range(10)]

for i in range(n):
    b = int(str(i)[0])
    c = int(str(i)[-1])
    a[b][c] += 1

ans = 0
for i in range(1,10):
    for j in range(1,10):
        ans += a[i][j]*a[j][i]
print(ans)
# Judge status: Accepted
n,x = map(int,input().split())
al = list(map(int,input().split()))
al.sort()
c = 0
for a in al:
  if x >= a:
    c += 1
  x -= a
if x > 0 and c > 0:
  c -= 1
print(c)
# Judge status: Wrong Answer
from bisect import bisect_left
import heapq
n=int(input())
l=[]
l.append(int(input()))
heapq.heapify(l)
for i in range(n-1):
    a=int(input())
    x=bisect_left(l,a)
    if x==0:
        heapq.heappush(l,a)
    else:
        l[x-1]=a
print(len(l))
# Judge status: Accepted
def main():
    x, y, z = map(int, input().split())

    print((x - z) // (y + z))


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
from sys import stdin, stdout
l = list(map(int, stdin.readline().rstrip().split(' ')))
f=[]
i=-1
n = 0
while(n<len(l)):
  f.append(l[i])
  i = i+1
  n= n+1
print(f)
# Judge status: Wrong Answer
tmp = input().split()

K = tmp[0]
X = tmp[1]

yen = K *500

if (yen >= X):
    print("Yse")
else:
    print("No")
# Judge status: Accepted
n = int(input())
count = [0] * (10**6)
s = 0

for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            s = i * i + j * j + k * k + i * j + j * k + k * i 
            count[s - 1] += 1
for i in range(n):
    print(count[i])
# Judge status: Wrong Answer
import sys
readline = sys.stdin.buffer.readline
from fractions import gcd
from functools import reduce

n,m = map(int,readline().split())
alst = list(map(int,readline().split()))

if n == 1:
  g = alst[0]
  if g * 3 > 2 * m:
    print(0)
  else:
    print((m-g//2)//g)
  quit()
else:
  mm = 2 * m
  f = lambda x,y:x*y//gcd(x,y)
  g = reduce(f, alst)
if g > mm:
  print(0)
else:
  c = mm // g
  c = c//2+c%2
  print(c)
# Judge status: Wrong Answer
K = int(input())
A,B = input().split()
if K == 1:
    print('OK')
else:
    for i in range(int(A),int(B)):
        if i%K==0 :
            print('OK')
            break
        elif i == int(B)-1:
            print('NG')
# Judge status: Accepted
N = int(input())
A = map(int, input().split())

ans = 0
m = 10 ** 9 + 1
cnt = 0
for a in A:
    if a < 0:
        cnt ^= 1
        a *= -1
    m = min(m, a)
    ans += a

if cnt:
    ans -= 2 * m

print(ans)
# Judge status: Wrong Answer
K = int(input())
A, B = map(int, input().split())
for i in range(A+1,B+1):
    if i%K==0:
        print("OK")
        exit()
print("NG")
# Judge status: Accepted
import math
N = int(input())

a = math.ceil(math.sqrt(N))

yaku = {1,N}

for i in range(2,a+1):
  if N % i == 0:
    yaku.add(i)
    yaku.add(N // i)

sl = len(yaku)
lyaku =list(yaku)
lyaku.sort()
if sl % 2 == 1:
  print((lyaku[sl//2]-1)*2)
else:
  print(lyaku[sl//2]+lyaku[sl//2-1] -2)
# Judge status: Wrong Answer
x,y=map(int,input().split())
import bisect as bi
ans=1
for i in range(80):
    if x*2<=y:
        ans+=1
print(ans)
# Judge status: Wrong Answer
a, b = map(int, input().split())
def answer(a, b) -> str:
    if (a * b) % 2 == 0:
        return 'Even'
    else:
        return 'Odd'
# Judge status: Accepted
from collections import deque

N = int(input())
c = list(str(input()))
dw = deque()
dr = deque()

for i, c in enumerate(c, 1):
    if c == 'W':
        dw.append(i)
    else:
        dr.appendleft(i)

ans = 0
while dw and dr:
    w = dw.popleft()
    r = dr.popleft()
    if w < r:
        ans += 1

    else:
        break
print(ans)
# Judge status: Wrong Answer
S = str(input())
T = str(input())
if T != S[-1]:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
A, B = map(int, input().split())
print((A + B) // 2 if (A + B) % 2 == 0 else "IMPOSSIBLE")
# Judge status: Wrong Answer
n = int(input())
a = [int(i) for i in input().split()]
c = [0 for i in range(n+1)]
b = sorted(a)
cnt = 1
for i in range(n-1):
  if b[i]==b[i+1]:
    cnt += 1
  else:
    c[b[i]] = cnt
    cnt = 1
  if i==n-2:
    c[b[n-1]] = cnt
ans = 0
for i in range(n):
  ans += int(c[i]*(c[i]-1)/2)
for i in range(n):
  print(ans-(c[a[i]]-1))
# Judge status: Accepted
import re
a, b = map(str, input().split())
s = input()
ptn = '^\d{' + a + '}-\d{' + b + '}'
if re.search(ptn, s):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
x = int(input())
if x == 7 or x == 3 or x == 5:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
a, b = map(int, input().split())
print(a * b if a < 10 and b < 10 else -1)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))

for i in range(n):
    a[i] = a[i]-(i+1)

m1 = sum(a)//n
m2 = -(-sum(a)//n)

ans1 = 0
ans2 = 0

for i in range(n):
    ans1 += abs(a[i]-m1)
    ans2 += abs(a[i]-m2)

print(min(ans1,ans2))
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
    b[a[i]-1]=i+1
print(*b)
# Judge status: Wrong Answer
n = int(input())
a1 = int(input())
flag = a1%2
ans = a1//2
for i in range(n-1):
    a = int(input())
    if flag:
        ans+=1 if 0<a else 0
        ans+=(a-1)//2 if a!=0 else 0
        flag=1 if a!=0 and (a-1)%2==0 else 0
    else:
        ans +=a//2
        flag=a%2
print(ans)
# Judge status: Accepted
def main():
    N, K = [int(x) for x in input().split()]
    a = [int(x)-1 for x in input().split()]

    pos = 0
    while K > 0:
        if K&1:
            pos = a[pos]
        # doubling
        a = [a[a[i]] for i in range(N)]
        K >>= 1
    print(pos+1)


if __name__ == '__main__':
    main()
# Judge status: Accepted
#ABC105-B
n = int(input())
divisor_list = []
ans = 0
for i in range(1,n+1):
    divisor_list = []
    #odd,even判定
    if(i % 2 != 0):
        #約数をdivisor_listに追加していく
        for j in range(1,i+1):
            if (i % j == 0):
                divisor_list.append(j)
            if(len(divisor_list) == 8):
                ans += 1
print(ans)
# Judge status: Accepted
str1=input()
str2=input()
str3=str1[::-1]
if str3==str2:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n,*a=map(int,open(0).read().split())
x=0
for i in a:x^=i
for i in a:print(x^i)
# Judge status: Accepted
AB, BC, CA = map(int, input().split())
print(AB*BC//2)
# Judge status: Accepted
S = list(map(int, list(input())))
c = sum(S)
print(2 * min(c, len(S) - c))
# Judge status: Accepted
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    X,Y=map(int,input().split())
    print(X+Y//2)

if __name__ == '__main__':
    main()
# Judge status: Accepted
S = sorted(list(set(input())))

alphabet = list('abcdefghijklmnopqrstuvwxyz')

for i in range(len(alphabet)):
    if alphabet[i] not in S:
        print(alphabet[i])
        exit()

print('None')
# Judge status: Accepted
Age,Pri=map(int,input().split())
if Age>=13:
    print(Pri)
elif Age<=5:
    print(0)
else:
    print(int(Pri/2))
# Judge status: Accepted
import math

H = int(input())
W = int(input())
N = int(input())

print(math.ceil(N / max(H, W)))
# Judge status: Accepted
n , m = map(int,input().split())
day = list(map(int, input().split()))
aso = n-sum(day)
print(aso if aso >= 0 else "-1")
# Judge status: Accepted
A, B, C=list(map(int,input().split()))
K=int(input())
for i in range(K):
    if A>=B:
        B=2*B
    elif B>=C:
        C=2*C
if A<B<C:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
s=str(input())
if s[0]=="R":
    print("Sunny")
elif s[0]=="S":
    print("Cloudy")
elif s[0]=="C":
    print("Rainy")
# Judge status: Accepted
S = input()
A = []
for c in S:
	if c == 'B':
		if A:
			A.pop()
	else:
		A.append(c)
print(''.join(A))
# Judge status: Wrong Answer
N = int(input())
S = list(map(str,input().split()))

T = list(set(S))
print(len(T))
# Judge status: Accepted
import math

def prime(n):
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True

n = int(input())
while True:
  if prime(n):
    break
  else:
    n += 1
print(n)
# Judge status: Accepted
s = input()

if  s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print("Bad")
else:
    print("Good")
# Judge status: Accepted
#141_B
s = input()
flg = True
for i in range(len(s)):
    if i % 2 == 0 and s[i] == 'L':
        flg = False
        break
    if i % 2 == 1 and s[i] == 'R':
        flg = False
        break
print('Yes' if flg else 'No')
# Judge status: Wrong Answer
import math

def mean(x):
    n = len(x)
    return sum(x)/n

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

ai = [a[i] - (i+1) for i in range(n)]
b = math.floor(mean(ai))
result = sum([abs(ai[i] - b) for i in range(n)])
print(result)
# Judge status: Wrong Answer
import copy
from collections import Counter

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

count = [0]*(n+1)

for i in range(n):
    count[lis[i]] += 1

if len(set(count)) <= k:
    print(0)
    exit()

cnt = sorted(count)
nlis = []
for i in range(n+1):
    if cnt[i] != 0:
        nlis.append(cnt[i])

ans = 0
for i in range(len(nlis)-k):
    ans += nlis[i]
    
print(ans)
# Judge status: Wrong Answer
n, a, b, c, d = map(int, input().split())
S = input()
if c < d:
    if "##" in S[(a-1):]:
        print("No")
    else:
        print("Yes")
else:
    if "..." in S[(b-1):]:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
S = input().rstrip()
T = input().rstrip()
flg = False
for i in range(len(S)):
    cnt = 0
    for j, s in enumerate(S):
        if s==T[j-i]: cnt += 1
    if cnt==len(S):
        flg = True
if flg:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n = int(input())
power = 1
for i in range(n):
    power = power * (i+1)
    power = power % (10**9 +7)
print(power)
# Judge status: Wrong Answer
s = input()
ans = ""
for i in range(len(s)-1):
  if s[i+1] != 'B':
    ans += s[i]
    
print(ans)
# Judge status: Accepted
a,b=map(int,input().split())
if a==b:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N, M = map(int, input().split())
f = 0
A = [-1 for i in range(N)]
for i in range(M):
  s, c = map(int, input().split())
  if A[s-1] != -1 and A[s-1] != c:
    print(-1)
    f = 1
    break
  A[s-1] = c
if f == 0:
  if N == 1 and (A[0] <= 0):
    print(0)
  elif N > 1 and A[0] == 0:
    print(-1)
  else:
    ans = 0
    for i in range(N):
      if i == 0:
        ans = ans * 10 + max(A[i], 1)
      else:
        ans = ans * 10 + max(A[i], 0)
    print(ans)
# Judge status: Accepted
import heapq

dic = {}
n, m = map(int, input().split())
for _ in range(n):
  a, b = map(int, input().split())
  if dic.get(a) is not None:
    dic[a].append(-b)
  else:
    dic[a] = [-b,]

ans = 0
bite = []
for i in range(1, m+1):
  if dic.get(i) is not None:
    #bite = bite + dic[i]
    for val in dic[i]:
      heapq.heappush(bite, val)
  if len(bite) > 0:
    #heapq.heapify(bite)
    ans += heapq.heappop(bite)
print(ans*-1)
# Judge status: Accepted
import math
n=int(input())
l=list(map(int,input().split()))
ans=[0]*n
for i in range(n):
    ans[l[i]-1]=i+1
for i in ans:
    print(i,end=" ")
# Judge status: Wrong Answer
n=int(input())
print(sum(sorted(map(int,input().split()))[n:2*n]))
# Judge status: Accepted
n = int(input())
if n%2 == 0:
    print((n/2)/n)
else:
    print(((n+1)/2)/n)
# Judge status: Accepted
x,y = map(int,input().split())
ans = x + y//2
print(ans)
# Judge status: Accepted
def solve(h, w, n):
    return min((n+h-1) // h, (n+w-1) // w)

h = int(input())
w = int(input())
n = int(input())
print(solve(h, w, n))
# Judge status: Accepted
S = input()
T = input()

ans = []
for l in range(len(S) - len(T) + 1):
    U = S[l: l + len(T)]
    for u, t in zip(U, T):
        if u == '?':
            continue
        if u != t:
            break
    else:
        ans.append((S[:l] + T + S[l + len(T):]).replace('?', 'a'))

ans.sort()
print(ans[0] if len(ans) > 0 else 'UNRESTORABLE')
# Judge status: Accepted
print(1*(eval(input().replace(' ','%'))>=1))
# Judge status: Wrong Answer
N = int(input())

y = N % 15 * 200
x = N * 800

print(x - y)
# Judge status: Accepted
n = int(input())
res = 1
a = list(map(int,input().split()))
if 0 in a:
    print(0)
else:
    for i in range(n):
        res *= a[i]
        if res > 10**18:
            print(-1)
            quit()
    print(res)
# Judge status: Accepted
n = int(input())
x = list(map(int, input().split()))

min_cnt = 10000000

for p in range(1, 100):
    cnt = 0
    for i in range(n):
        cnt += (p - x[i])**2
    if min_cnt > cnt:
        min_cnt = cnt

print(min_cnt)
# Judge status: Accepted
N=int(input())
S=list(input())
a1=[i for i in range(0,(N//2))]
a2=[i for i in range((N//2),N)]
a3=[S[i] for i in a1]
a4=[S[i] for i in a2]
print('Yes' if a3==a4 else 'No')
# Judge status: Accepted
N = int(input())
lst = []
for i in range(N):
  s, p = input().split()
  lst.append([s, int(p), i+1])
lst = sorted(lst, key = lambda x: x[1], reverse=True)
lst = sorted(lst, key = lambda x: x[0])
for j in range(N):
  print(lst[j][2], end=" ")
# Judge status: Accepted
H=int(input())
count=0
while H!=0: 
    count += 1
    H //= 2
print(2**count-1)
# Judge status: Accepted
s = str(input())
a = "abcdefghijklmnopqrstuvwxyz"
count = 0
n = 0
for i in range(len(a)):
    for j in range(len(s)):
        if a[i] == s[j]:
            count += 1
            break
    if count == 0:
        ans = a[i]
        print(ans)
        n = 1
        break
    else:
        count = 0
if n == 0:
    print("None")
# Judge status: Accepted
a, b, c, k = [int(w) for w in input().split()]

print(a - b if k % 2 == 0 else b - a)
# Judge status: Wrong Answer
n = int(input())
if n == 0:
    print(0)
if n == 1:
    print(0)
else:
    if n % 2 ==1:
        print(0)
    else:
        ans = 0
        i = 1
        while  True:
            ans_plus=n//(2*5**i)
            if ans_plus==0:
                break
            ans += ans_plus
            
            i += 1
        print(ans)
# Judge status: Wrong Answer
import math
N,M,K = map(int,input().split())
list = [0 for i in range(N*M+1)]
i = 0
while i < M:
    list[N*i]=1
    list[N*i+(M-2*i)]=1
    i+=1
j = 0
while j < N:
    list[M*j]=1
    list[M*j+(N-2*j)]=1
    j+=1
if list[K] ==1:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
a,b,c=map(int,input().split())
flag=0
for i in range(b):
  if (a*(i+1)%b==c):
    print("YES")
    flag=1
    break
    
if (flag==0):
  print("NO")
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
up = dn = False
ans = 1
p = A[0]
for a in A:
    if p < a:
        up = True
    elif p > a:
        dn = True
    if up and dn:
        ans += 1
        up = dn = False
    p = a
print(ans)
# Judge status: Wrong Answer
S = input()

tmp1 = [0 for _ in range(len(S)+1)]
tmp2 = [0 for _ in range(len(S)+1)]

for i in range(len(S)):
  if S[i] == '>':
    tmp1[i] = 1
  else:
    tmp2[i+1] = 1

for i in range(1, len(S)+1):
  if tmp1[-i-1] != 0:
    tmp1[-i-1] = tmp1[-i] + tmp1[-i-1]

for i in range(2, len(S)):
  if tmp2[i] != 0:
    tmp2[i] = tmp2[i] + tmp2[i-1]

ans = 0
for i in range(len(S)+1):
  ans += max(tmp1[i], tmp2[i])

print(ans)
# Judge status: Wrong Answer
import math
N,K = map(int,input().split())
A = list(map(int,input().split()))
for j in range(min(K,int(math.log2(N)+2))):
	B = [0]*N
	for i in range(N):
		l = max(0,i-A[i])
		r = min(N-1,i+A[i])
		B[l] += 1
		if r < N-1:
			B[r+1] -= 1
	for i in range(1,N):
		B[i] += B[i-1]
	A = B
print(' '.join(map(str,A)))
# Judge status: Wrong Answer
ans = 0
for _ in range(3):
    c = list(map(int, input().split()))
    ans += sum(c)

if ans % 3 == 0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N,K = map(int,input().split())
sum_ans = 0
 #get "ruisekiwa"
c_sum = [0]*(N+2)
for i in range(N+1):
    c_sum[i+1]+=c_sum[i]+i

for i in range(K,N+2):
    sum_ans+= ((c_sum[N+1]-c_sum[N+1-i])-(c_sum[i]-c_sum[0])+1)
print(sum_ans%(10**9+7))
# Judge status: Wrong Answer
w=input()
l='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
if len(w)%2!=0:
    print('No')
else:
    for i in range(26):
        if w.count(l[i])%2!=0:
            print('No')
            break
        else:
            continue
    print('Yes')
# Judge status: Accepted
i = list(map(int, input().split()))

j = i[0] % i[1]
k = i[1] -j

print(min(j,k))
# Judge status: Wrong Answer
a,b=input(),input()
for i in range(1,4):
  if i is (not a or b):
    print(i)
# Judge status: Accepted
from sys import  stdin
A, B = [int(x) for x in stdin.readline().rstrip().split()]
if A%B==0:
    print(0)
else:
    print(1)
# Judge status: Accepted
a,b,x=map(int,input().split())
print("YES"if a<=x and a+b>=x else "NO")
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
count = [0] * 200005
for a in A:
    count[a] += 1

s = 0
for c in count:
    s += c * (c - 1) // 2
print(s)

for a in A:
    c = count[a]
    x = c * (c - 1) // 2
    c -= 1
    y = c * (c - 1) // 2

    print(s - x + y)
# Judge status: Accepted
N, M = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(N)]
C = [list(map(int, input().split())) for _ in range(M)]


for a in A:
    distance = 10**9
    point = 0
    for i, c in enumerate(C):
        if abs(a[0] - c[0]) + abs(a[1] - c[1]) < distance:
            distance = abs(a[0] - c[0]) + abs(a[1] - c[1])
            point = i
    print(point + 1)
# Judge status: Wrong Answer
def prime(p):
    memo = []
    for i in range(2,(int(p**0.5)+1)):
        jousu = 1
        while p%(i**jousu)==0:
            p //= i**jousu
            memo.append(i**jousu)
            jousu += 1
    if p != 1:
        memo.append(p)
    return memo
 
n=int(input())
 
memo = prime(n)

memo = set(memo)

if len(memo) == 0:
  print(0)
else: 
  print(len(memo))
# Judge status: Wrong Answer
N = int(input())
lst = [0]*N

for i in range(1,N+1):
    for j in range(1,N+1):
        if j % i == 0:
            lst[j-1] += j

print(lst)
print(sum(lst))
# Judge status: Accepted


def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    s=input()
    z=s.count("0")
    o=s.count("1")
    print(min(z,o)*2)

main()
# Judge status: Wrong Answer
import math
h,a=map(int,input().split())
print (math.floor(h/a))
# Judge status: Wrong Answer
n,m,k = map(int,input().split())
if k>n and k > m:
    print("No")
else:
    print("Yes")
# Judge status: Wrong Answer
n = int(input())
l = [input() for _ in [0]*n]
print(l)
if len(set(l)) != n:
    print('No')
else:
    for i in range(n-1):
        print(i)
        print(list(l[i])[-1])
        print(list(l[i+1])[0])
        if list(l[i])[-1] != list(l[i+1][0]):
            print('No')
        #else:
            #print('Noo')
            #break
    #else:
    print('Yes')
# Judge status: Wrong Answer
N,K = list(map(str, input().split()))
D = sorted(input().split())
W = []
P = ""
for i in range(10):
    if str(i) not in D:
        W.append(str(i))
for i in range(len(N)):
    for j in range(len(W)):
        if N[i] <= W[j]:
            P += W[j]
            break
    if i == 0 and P == "":
        if W[0] == "0":
            P = W[1] + W[0] + P
        else:
            P = W[0] + W[0] + P

print(int(P))
# Judge status: Accepted
n=int(input())
ans=n*(n-1)//2
print(ans)
# Judge status: Accepted
a, b = map(int, input().split())
for i in range(1, 2000):
  if i * 8 // 100 == a and i * 10 // 100 == b:
    print(i)
    break
else:
  print(-1)
# Judge status: Accepted
A, B = map(int, input().split())

if (A+B)%2 == 0:
    print(int((A+B)/2))
else:
    print("IMPOSSIBLE")
# Judge status: Wrong Answer
def solve():
    N = int(input())
    S = input()
    if N % 2 == 0:
        if S[:(N//2)] == S[(N//2):]:
            print(S[:(N//2+1)])
            print(S[(N//2):])
            print('Yes')
        else:
            print('No')
    else:
        print('No')

if __name__ == '__main__':
    solve()
# Judge status: Accepted
A,B,C,K = map(int, input().split())
limit = 1e18

if abs(A-B)>=limit:
    print('Unfair')
else:
    if K%2==0:
        print(A-B)
    else:
        print(B-A)