peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
import math

ans = 0
k = int(input())
for a in range(k):
    for b in range(k):
        tmp = math.gcd(a, b)
        for c in range(k):
            ans += math.gcd(tmp, c)

print(ans)
# Judge status: Accepted
a,b,k = map(int, input().split())
s = []
for i in range(1,101):
    if a % i == 0 and b % i == 0:
        s.append(i)
    if i > a or i > b:
        break
print(s[-k])
# Judge status: Accepted
x, y = map(int, input().split())

for i in range(0, x+1):
    if i * 2 + (x - i) * 4 == y:
        print('Yes')
        exit()

print('No')
# Judge status: Accepted
a, b, c = map(int,input().split())
if b - a == c - b:
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
a, b = map(int, input().split())
if a > 10 or b > 10:
  print(-1)
else:
  print(a * b)
# Judge status: Wrong Answer
n, m = map(int, input().split())

s = [0] * n
s[0] = 1
b = [1] * n
for i in range(m):
    x, y = map(int, input().split())
    b[x-1] -= 1
    b[y-1] += 1

    s[x-1] = int(b[x-1] != 0)
    s[y-1] = s[x-1]

ans = 0
for i in range(n):
    if s[i] and b[i]:
        ans += 1

print(ans)
# Judge status: Wrong Answer
A = list(map(int, input().split()))

X=A[0]
K=A[1]
D=A[2]

answer=X
for i in range(K):
  if(abs(X-D) < answer):
    answer = abs(X-D)
    X = X-D
    i += 1
  elif(abs(X+D) < answer):
    answer = abs(X-D)
    X = X-D
    i += 1

print(answer)
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

if a == b and b == c:
    print(1)
elif a == b and b != c:
    print(2)
elif a != b and b == c:
    print(2)
elif a != b and b != c:
    print(3)
# Judge status: Accepted
n=int(input())
dic = {}
max = 1
for i in range(n):
    s = input()
    if s not in dic:
        dic[s] = 1
    else:
        dic[s] += 1
        if max < dic[s]:
            max = dic[s]
l = []
for i in dic.keys():
    if dic[i] == max:
        l += [i]
l.sort()
for i in l:
    print(i)
# Judge status: Accepted
x=input()
listp={'Sunny':'Cloudy','Cloudy':'Rainy','Rainy':'Sunny'}
print(listp[x])
# Judge status: Wrong Answer
n=input()
s=input()
x=0
xx=[]
for i in s:
    if i=="I":
        x+=1
        xx.append(x)
    else:
        x-=1
        xx.append(x)
print(max(xx))
# Judge status: Wrong Answer
x,n,*a=map(int,open(0).read().split())
b=[1]*101
for i in a:
    b[i]=0
c=1000 
ans=0
for i in range(101):
    if b[i] and c>=abs(x-i):
        c=abs(x-i)
        ans=i
print(ans)
# Judge status: Accepted
x = int(input())
q = x // 100
r = x % 100
r -= 5 * q
print(1 if r <= 0 else 0)
# Judge status: Accepted
K,A,B=map(int, input().split())
ans=K+1
if A<B and K>=A:
    n=K-A+1
    ans=max(ans, A+n//2*(B-A)+(n&1))
print(ans)
# Judge status: Accepted
# D
N = int(input())
A = list(map(int,input().split()))

next_number = 1
cnt = 0
for a in A:
  if a == next_number:
    next_number += 1
  else:
    cnt += 1
if cnt == len(A):
  print('-1')
else:
  print(cnt)
# Judge status: Wrong Answer
def main():
    n = int(input())
    alp = "zabcdefghijklmnopqrstuvwxy"
    res = ""
    for i in range(1,100):
        if(n<=26**i):
            for j in range(i):
                res+=chr(ord("a")+n%26)
                n//=26

            break
        else:
            n-=26**i
    print(res[::-1])

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
X, K, D = map(int, input().split())
X = abs(X)
if X > K * D:
  print(X - K * D)
elif X == D:
  if K % 2 == 0:
    print(X)
  else:
    print(abs(X - D)) 
else:
  X = X % D
  K -= X // D
  if K % 2 == 0:
    print(X)
  else:
    print(abs(X - D))
# Judge status: Accepted
x = int(input())
n = x // 11
a = x % 11
add = 0
if 0 < a <=6:
    add += 1
elif a > 6:
    add += 2
print(add+n*2)
# Judge status: Wrong Answer
import math
a,b,x = map(int,input().split())

if b > 0:
  bb = b//x+1
else:
  bb = 0
  
if a > 0:
  a = a - 1
  aa = a//x+1
else:
  aa = 0
print(bb-aa)
# Judge status: Accepted
import math
pi = math.pi*2
R = int(input())
print(R*pi)
# Judge status: Accepted
def Solver(X):
    K=0
    P=0

    for s in X:
        if s=="S":
            P+=1
        elif P>0:
            P-=1
        else:
            K+=1

    return 2*K
#================================================
X=input()
print(Solver(X))
# Judge status: Accepted
n = int(input())
r = 'a',
for _ in range(n - 1):
  r = {s + c for s in r for c in s + chr(ord(max(s)) + 1)}
print(*sorted(r), sep='\n')
# Judge status: Wrong Answer
a,b,c = list(map(int,input().split()))

print(c,b,a)
# Judge status: Wrong Answer
N = int(input())
S = []
cnt = 0
for _ in range(N):
    cnt += 1
    i,p = input().split()
    S.append([i,int(p),cnt+1])

S.sort(reverse = True)

for i in S:
  print(i[2])
# Judge status: Accepted
import operator
from itertools import accumulate

def main():
  N = int(input())
  A = list(map(int, input().split()))
  A_sum = list(reversed(list(accumulate(reversed(A))))) + [0]
  B = [0] * (N+1)

  B[0] = 1 - A[0]
  d = A_sum[0] + B[0]
  if B[0] < 0:
    return -1
  for i in range(1, N+1):
    B[i] = min(B[i - 1] * 2 - A[i], A_sum[i+1])
    
    if B[i] < 0:
      return -1
    d += B[i]
  return d

print(main())
# Judge status: Accepted
import math
n = int(input())

def first_last(n):return n//(10**int(math.log10(n))), n%10
data = []
for i in range(9):data.append([0, 0, 0, 0, 0, 0, 0, 0, 0])

for i in range(1, n+1):
    first, last = first_last(i)
    if(first!=0 and last!=0):data[first-1][last-1] += 1

ans = 0
for i in range(9):
    for j in range(9):
        ans += data[i][j] * data[j][i]
print(ans)
# Judge status: Accepted
N, K = map(int, input().split())
H = list(map(int, input().split()))
H.sort()
idx = max(N-K,0)
print (sum(H[:idx]))
# Judge status: Accepted
h=int(input())
d=dict()
d[0]=0
d[1]=1
d[2]=3
d[3]=3
def solve(h):
    if h in d.keys():
        return d[h]
    d[h]=2*solve(h//2)+1
    return d[h]
print(solve(h))
# Judge status: Accepted
import math

N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

cnt1, cnt2 = 0, 0
for i in range(N):
    if a[i] > b[i]:
        cnt1 += a[i] - b[i]
    elif a[i] < b[i]:
        cnt2 += math.ceil((b[i]-a[i])/2)

cnt = sum(b) - sum(a)
if cnt1 <= cnt and cnt2 <= cnt:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
PI = 3.1415

# utility function 
def circumference(r): 
	return (2 * PI * r) 


# driver function 
k=int(input(" "))
print ('%.3f' % circumference(k))
# Judge status: Accepted
print('Yes' if '9' in input() else 'No')
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
print(sum(A[1:2*N:2]))
# Judge status: Wrong Answer
a,b = map(int,input().split())

if a > 0 or a == b:
  print('Positive')
elif a <= 0 <= b:
  print('Zero')
else:
  print('Positive' if b - a % 2 == 1 else 'Negative')
# Judge status: Accepted
S = input()
T = input()
s = len(S)
t = len(T)

ans = 1000

for i in range(s-t+1):
  cnt = 0
  for j in range(t):
    if S[i+j] != T[j]:
      cnt += 1
  ans = min(ans, cnt)

print(ans)
# Judge status: Accepted
def main():
    N, M = map(int, input().split())
    X = list(map(int, input().split()))
    if N >= M:
        print(0)
        return
    X.sort()
    distance = []
    for i in range(M-1):
        distance.append(X[i+1] - X[i])
    distance.sort()
    for _ in range(N-1):
        distance.pop()
    ans = sum(distance)
    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Accepted
n = int(input())
ls = list(map(int, input().split()))

ans = [0] * (10**5 + 2)

for i in range(n):
	ans[ls[i]] += 1
	ans[ls[i]+1] += 1
	ans[ls[i]+2] += 1
	
print(max(ans))
# Judge status: Accepted
S = input()
cnt = 0
for i in range(len(S) // 2):
  if S[i] != S[-(i+1)]:
    cnt += 1
 
print(cnt)
# Judge status: Wrong Answer
x, a, b = map(int, input().split())
if abs(x-a) > abs(x-b):
  print('A')
else:
  print('B')
# Judge status: Accepted
from bisect import bisect_left

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

count = 0
length_list.sort()

for a_idx in range(n - 2):
    for b_idx in range(a_idx + 1, n - 1):
        a = length_list[a_idx]
        b = length_list[b_idx]

        left_count = bisect_left(length_list, a+b)
        count += max(0, left_count - b_idx - 1)


print(count)
# Judge status: Wrong Answer
n,m=map(int,input().split())
ans=[]
li=[1 for _ in range(n)]
for i in range(m):
    x, y = map(int, input().split())
    li[x-1]-=1
    li[y-1]+=1
    if i==0:
        if x==1:
            ans.append(y)
    else:
        if x in ans:
            ans.append(y)
cnt=0
for j in set(ans):
    if li[j-1]!=0:
        cnt+=1
print(cnt)
# Judge status: Wrong Answer
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
A = a % 10
B = b % 10
C = c % 10
D = d % 10
E = e % 10
M = min(A+1,B+1,C+1,D+1,E+1)
print(a+b+c+d+e+A+B+C+D+E-(M-1))
# Judge status: Wrong Answer
N, X = [int(s) for s in input().split(' ')]
Ls = [int(s) for s in input().split(' ')]
suma = [0]
for L in Ls:
    suma.append(suma[-1] + L)
    if suma[-1] > X:
        break
print(len(suma) - 1)
# Judge status: Accepted
n,k=map(int,input().split())
*a,=map(int,input().split())
l,r=0,10**9
while r-l>1:
    m=(l+r)//2
    t=0
    for x in a:
        if x<=m:
            continue
        t+=(x+m-1)//m-1
    if t<=k:
        r=m
    else:
        l=m
print(r)
# Judge status: Accepted
A, B = map(int, input().split())
K = A + B
if K % 2 == 0:
    print(K//2)
else:
    print("IMPOSSIBLE")
# Judge status: Accepted
n = int(input())
a_list = list(map(int,input().split()))
pr_abs = []
for i in range(n):
  pr_abs.append(a_list[i] - i-1)


pr_abs.sort()
if len(a_list) % 2 == 1:
  median = pr_abs[(n-1)//2]
  ans = 0
  for i in range(n):
    ans += abs(pr_abs[i] - median)
else:
  median = (pr_abs[(n-2)//2] + pr_abs[n//2])//2
  ans = 0
  for i in range(n):
    ans += abs(pr_abs[i] - median)
    
print(ans)
# Judge status: Accepted
s, t = input().split()
print(t + s)
# Judge status: Accepted
x = int(input())

ans = 0
for i in range(1, 100):
    for j in range(2, 100):
        if i ** j <= x:
            ans = max(ans, i ** j)
print(ans)
# Judge status: Wrong Answer
from math import floor


def main():
    N = int(input())
    v = list(map(int, input().split(" ")))
    while len(v) > 1:
        N = len(v)
        v.sort()
        w = []
        if len(v) % 2 == 1:
            w.append(v[-1])
            N -= 1
        for i in range(floor(N / 2)):
            w.append((v[i * 2] + v[i * 2 + 1]) / 2)
        v = w
    print(v[0])


if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())
Book = [0] * N
for i in range(N):
    s,q = input().split()
    p = int(q)
    Book[i] = (s, 100-p, i)

Book.sort()

for i in range(N):
    print(Book[i][2]+1)
# Judge status: Wrong Answer
n = int(input())
v = list(map(int,input().split()))
v.sort(reverse=True)
if n == 2:
    print((v[0]+v[1])/2)
else:
    for i in range(n-1):
        p = (v[-1] + v[-2])/2
        v.pop(-1)
        v.pop(-1)
        v.append(p)
        v.sort()
    print(v[0])
# Judge status: Wrong Answer
x = int(input())
print(x // 11 * 2 + (x % 11 > 6) + 1)
# Judge status: Wrong Answer
i,j = map(int,input().split())
a,b = divmod(i,2019)
c,d = divmod(j,2019)


if c-a > 0:
    ans = 0
else:
    ans = b*(b+1)
print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
print(max(0,c-(a-b)))
# Judge status: Accepted
n=int(input())
for i in range(n):
  print(1)
# Judge status: Wrong Answer
def checkKaibun(str):
    for i in range(int((len(str) - 1) / 2)):
        if str[i] != str[-i - 1]:
            return False
    return True
 
s = input()
n = len(s)
c2e = int((n - 1) / 2)
c3s = int((n + 3) / 2)
if not checkKaibun(s):
    print('No')
elif not checkKaibun(s[0:c2e]):
    print('No')
elif not checkKaibun(s[c3s:n]):
    print('No')
else :
    print('Yes')
# Judge status: Accepted
(A, B, C, X) = [int(input()) for i in range(4)]
ways = 0

max_a = int( X / 500 )
if A < max_a :
  max_a = A
for a in reversed(range( max_a+1 )) :
  max_b = int( (X - 500 * a) / 100 )
  if B < max_b :
    max_b = B
  for b in reversed(range( max_b+1 )) :
    c = int ( ( X - 500 * a - 100 * b ) / 50 )
    if c > C :
      break
    ways += 1
print('%d' %ways ) ;
# Judge status: Accepted
h,n=map(int,input().split())
a=list(map(int,input().split()))
print("No" if h > sum(a) else "Yes")
# Judge status: Accepted
H, N = map(int, input().split())

A = list(map(int, input().split()))
sum_A = sum(A)

if H <= sum_A:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import sys

X,K,D = list(map(int, input().split()))

ans = 9999999
if abs(X) >= K * D:
    ans = abs(X) - K*D
else:
    A = abs(X) % D
    B = K - (abs(X) // D)

    if B % 2 == 0:
        ans = A
    else:
        ans = abs(A - D)

print(ans)
# Judge status: Accepted
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


N, M = MI()
A = LMI()

print(max(-1, N - sum(A)))
# Judge status: Accepted
n=int(input())
c=list(map(int,input().split()))
minans=1000000000
for j in range(-101,101):
  ans=0
  for i in range(n):
    ans+=(c[i]-j)**2
  minans=min(ans,minans)
print(minans)
# Judge status: Accepted
def DFS(word,n):
  if len(word)==N:
    return print(word)
  else:
    for i in range(n+1):
      if i==0 :
        DFS(word+chr(97+i),n+1)
      elif chr(97+i-1) in word:
        DFS(word+chr(97+i),n+1)

N=int(input())
DFS('',0)
# Judge status: Accepted
from itertools import combinations_with_replacement as cr
n,m,q=map(int,input().split())
s=[list(map(int,input().split()))for i in range(q)]
f=0
for i in cr([i for i in range(1,m+1)],n):
    e=0
    for a,b,c,d in s:
        if i[b-1]-i[a-1]==c:
            e+=d
    if f<e:f=e
print(f)
# Judge status: Accepted
#A
N, X, T=map(int, input().split())

print((N//X)*T if N%X ==0 else (N//X+1)*T)
# Judge status: Accepted
import itertools
NK = input().split()
N = NK[0]
K = int(NK[1])
 
d = input().split()
D = [int(s) for s in d]
 
Da = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
 
for i in D:
    Da.remove(i)
Da_str = [str(j) for j in Da]
 
a_1 = [''.join(j) for j in itertools.product(Da_str, repeat=len(N))]
a_2 = [''.join(j) for j in itertools.product(Da_str, repeat=len(N)+1)]
a = a_1 + a_2
nu = [int(k) for k in a]
 
for i in nu:
    if i >= int(N):
        print(i)
        break
# Judge status: Accepted
import math
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np


x= int(input())
# p = list(map(int, input().split()))

def iss(n):
    a = True
    for i in range(2,int(math.sqrt(n))+1):
        if n % i == 0:
            a = False

    return a
ans = 0
while 1:
    if iss(x):
        ans = x
        break
    x += 1

print(ans)
# Judge status: Wrong Answer
N, M = map(int, input().split())
if N >= M * 2:
    print(M // 2)
else:
    ret = N
    M -= N * 2
    ret += M // 4
    print(ret)
# Judge status: Accepted
cnt = [0]*(10**5+1)
n = int(input())
a = list(map(int,input().split()))
s = sum(a)
for i in range(n):
    cnt[a[i]] += 1
q = int(input())
for i in range(q):
    b,c = map(int,input().split())
    s += (c-b)*cnt[b]
    cnt[c] += cnt[b]
    cnt[b] = 0
    print(s)
# Judge status: Accepted
h = int(input())
w = int(input())
n = int(input())
for i in range(min(h,w)):
  if (i+1)*max(h,w)>=n:
    print(i+1)
    break
# Judge status: Accepted
# -*- coding: utf-8 -*-

def main():

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

    cost = 0
    listCost = []

    for i in range(min(a), max(a)+1):
        for j in a:
            if i != j:
                cost += (i - j) ** 2

        listCost.append(cost)
        cost = 0

    ans = min(listCost)

    print(ans)
    

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
X=int(input())
flag=0
while flag==0:
	X=X+1
	for k in range(2,int(X**0.5)+1):
		if k==int(X**0.5) and X%k!=0:
			flag=1
		
		if k>2 and k%2==0:
			continue
		elif k>3 and k%3==0:
			continue
		elif X%k==0:
			break
		
		
print(X)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))
a.sort()
tmp = 0
for i in range(n-1):
    if a[i]==a[i+1]:
        tmp = 1
        break
if tmp == 1:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))

emp = [0]*(n+1)

for i in range(len(a)):
    emp[a[i]] += 1

for i in range(1,n+1):
    print(emp[i])
# Judge status: Accepted
x,a,b=map(int,input().split())

A=abs(x-a)
B=abs(x-b)

if A>B:
  print('B')
else:
  print('A')
# Judge status: Accepted
a = sorted(list(map(int, input().split())),reverse=True)
print(a[0]*10+a[1]+a[2])
# Judge status: Wrong Answer

from collections import defaultdict

def prime_factor(n):
    d = defaultdict(int)
    for i in range(2, n + 1):
        if i * i > n:
            break

        while n % i == 0:
            d[i] += 1
            n //= i

    if n != 1:
        d[n] += 1

    return d


N = int(input())
d = prime_factor(N)
ans = 0
for v in d.values():
    i = 1
    res = 0
    while res < v:
        res += i
        i += 1
    ans += i - 1

print(ans)
# Judge status: Accepted
import math
N=int(input())
ans=0
cnt=0
for i in range(N):
  a=int(input())
  if a!=0:
    cnt+=a
  else:
    ans+=cnt//2
    cnt=0

print(ans+cnt//2)
# Judge status: Accepted

import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)



def acinput():
    return list(map(int, input().split(" ")))


def II():
    return int(input())

K,N=acinput()

A=acinput()
A.append(A[0]+K)
B=np.array(A)+K
#A.extend(B)
a=np.array(A)

print(K-np.max(a[1:]-a[:-1]))
# Judge status: Accepted
N, M = map(int,input().split())
An = list(map(lambda x:[int(x),1],input().split()))
D = [[0]*2 for _ in range(M)]
for i in range(M):
  B, C = map(int,input().split())
  D[i] = [C,B]
An.extend(D)
An.sort(reverse=True)
num = 0
cnt = 0
for i in range(len(An)):
  if cnt+An[i][1] >= N:
    num += An[i][0]*(N-cnt)
    print(num)
    break
  else:
    cnt += An[i][1]
    num += An[i][0]*An[i][1]
# Judge status: Accepted
x=int(input())
while True:
    for i in range(2,int(x**0.5)+1):
        if x%i == 0:
            x+=1
            break
    else:
        break
print(x)
# Judge status: Accepted
a = list(map(int,input().split()))
a.sort(reverse = True)
if a[0] % 2 == 0 or a[1] % 2 == 0 or a[2] % 2 == 0:
    print(0)
    exit(0)
block = a[0] * a[1] * a[2]
a[0] = a[0] // 2
x = a[0] * a[1] * a[2]
y = block - x
print(abs(x - y))
# Judge status: Accepted
n,k,s=map(int,input().split())
ans=[]
i=0
if(s!=10**9):
    for _ in range(n):
        if(i<k):
            ans.append(s)
            i+=1
        else:
            ans.append(10**9)
else:
    for _ in range(n):
        if(i<k):
            ans.append(s)
            i+=1
        else:
            ans.append(1)

print(*ans)
# Judge status: Wrong Answer
n = int(input())
for i in range(111, 999, 111):
    if i >= n:
        print(i)
        break
# Judge status: Wrong Answer
import itertools
n, m, k = map(int, input().split())
a = [0] + list(map(int, input().split()))
b = [0] + list(map(int, input().split()))

sa = list(itertools.accumulate(a))
sb = list(itertools.accumulate(b))

max = 0

for i in range(1, n + 1):
    for j in range(1, m + 1):
        if (sa[i] + sb[j] <= k):
            if i + j > max:
                max = i + j
        else:
            break
print(max)
# Judge status: Wrong Answer
list_ = [int(x) for x in input().split() if (int(x) % 2) == 0]
for f in list_:
    if (f % 3 == 0) or (f % 5 == 0):
        continue
    else:
        print("DENIED")
        break
else:
    print("APPROVED")
# Judge status: Accepted
n,a,b = map(int,input().split())

cnt = int(n//(a+b))
res = int(n%(a+b))
if res <= a:
    print(cnt*a+res)
else:
    print((cnt+1)*a)
# Judge status: Wrong Answer
from collections import defaultdict
import numpy as np

A, B, M = map(int, input().split())
a = np.array(list(map(int, input().split())))
b = np.array(list(map(int, input().split())))

C = defaultdict(int)

for i in range(M):
    x, y, c = map(int, input().split())
    C[tuple([x-1, y-1])] = c

ans = a.min() + b.min()

for c in C:
    ans = min(ans, a[c[0]] - b[c[1]] - C[c])
    
print(ans)
# Judge status: Wrong Answer
n,y= map(int, input().split())
for i in range(0,n+1):
    for j in range(0,n+1-i):
        k=n-i-j
        if y==10000*i+5000*j+1000*k:
            print(i,j,k)
        break
# Judge status: Accepted
n,m = map(int,input().split())
g = [[] for i in range(n)]
for i in range(m):
  a,b = map(int,input().split())
  g[a-1].append(b)
  g[b-1].append(a)
for i in range(n):
  print(len((g[i])))
# Judge status: Accepted
L = list(sorted(map(int, input().split())))
if L[0] % 2 == 0 or L[1] % 2 == 0 or L[2] % 2 == 0:
  print(0)
else:
  print(L[0] * L[1])
# Judge status: Accepted
n, k = [int(i) for i in input().split()]
h = [int(input()) for _ in range(n)]

h.sort()
diff = []
for i in range(n-k+1):
    diff.append(h[i+k-1] - h[i])

print(min(diff))
# Judge status: Wrong Answer
import numpy as np
N, M = map(int,input().split())
C = np.zeros(N)
d = 0
H = list(map(int,input().split()))
for i in range(M):
  A, B = map(int,input().split())
  if H[A - 1] < H[B -1]:
    C[A - 1] += 1
  else:
    C[B - 1] += 1
for j in range(N):
  if C[j] == 0:
    d += 1
print(d)
# Judge status: Accepted
a, b, c = map(int,input().split())
if a+b>=c:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import bisect

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

A.sort()
C.sort()
ans = 0
for i in range(N):
    a_cnt = bisect.bisect_left(A, B[i])
    c_cnt = N-bisect.bisect_right(C, B[i])
    ans += a_cnt*c_cnt
print(ans)
# Judge status: Accepted
n,k = map(int,input().split())
nList = list(map(int,input().split()))
nSet = list(set(nList))
nDic = {}

for i in nList:
  if not(i in nDic.keys()):
    nDic[i] = 1
  else:
    nDic[i] += 1

countList = sorted(nDic.values())
print(sum(countList[:(len(nSet)-k)]))
# Judge status: Accepted
A, B = map(int,input().split())
import math

print(int(A*B/math.gcd(A,B)))
# Judge status: Accepted
s = input()
n = len(s) + 1
a = [0 for i in range(n)]
for i in range(n - 1):
  if s[i] == '<':
    a[i + 1] = max(a[i + 1], a[i] + 1)
for i in reversed(range(n - 1)):
  if s[i] == '>':
    a[i] = max(a[i], a[i + 1] + 1)
ans = sum(a)
print(ans)
# Judge status: Accepted
from itertools import permutations, combinations,combinations_with_replacement,product
s = input()
t = product(["+","-"],repeat=3)

for i in t:
    calc = s[0]+i[0]+s[1]+i[1]+s[2]+i[2]+s[3]
    sum = eval(calc)
    if(sum==7):
        print(calc+"=7")
        break
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))
val = set()
ans = []

for i in a:
    if i in val:
        ans.append(i)
    else:
        val.add(i)
ans.sort()
if len(ans) == 0:
    print(0)
else:
    if ans.count(ans[-1]) >= 4:
        print(ans[-1]**2)
    elif ans.count(ans[-1]) == 3:
        print(ans[-1]*ans[-4])
    elif ans.count(ans[-1]) == 2:
        print(ans[-1]*ans[-3])
    else:
        print(ans[-1]*ans[-2])
# Judge status: Wrong Answer
N,K=map(int,input().split())
x=list(map(int,input().split()))

res=[]
for i in range(N-K+1):
  tmp = abs(x[i])+x[i+K-1]-x[i]
  res.append(tmp)
  
for i in range(N-K+1):
  tmp = x[-i-1]+x[-i-1]-x[-i-K]
  res.append(tmp)
  
print(min(res))
# Judge status: Accepted
N = int(input())
A = [int(x) for x in input().split()]

from fractions import gcd

mod = int(1e9 + 7)

lcm = 1
for x in A:
    lcm = lcm * x // gcd(lcm, x)
lcm %= mod

ans = 0
for x in A:
    ans += lcm * pow(x, mod - 2, mod)
    ans %= mod

print(ans)
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n,a,b=map(int,input().split())
    if (b-a)%2==0:print((b-a)//2)
    else:print(min((b+a-1)//2,(2*n-b+1-a)//2))

if __name__=='__main__':
    main()
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if (a+b)>c:
    print('Yes')
else:
    print('No')