peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
from fractions import gcd
n = int(input())
res = int(input())
for i in range(n-1):
  w = int(input())
  res = res * w // gcd(res, w)
print(res)
# Judge status: Wrong Answer
import numpy as np

t = input()
l = np.array([float(x) for x in t.split()]).reshape(-1, 2)

count = 0
for i, c in enumerate(l):
    if i == 0:
        D = c[1]
        continue
    if np.sqrt(c[0] ** 2 + c[1] ** 2) <= D:
        count += 1
# Judge status: Wrong Answer
n=int(input())
a= list(map(int, input().split()))

count=0
flag=True
for i in range(n-1):
    if i==0:
        count+=1
        ans=a[i+1]-a[i]
    if not flag:
        ans=a[i+1]-a[i]
        flag=True

    if ans<=0 and a[i+1]-a[i]<=0 or ans>=0 and a[i+1]-a[i]>=0:
        continue

    else:
        count+=1
        flag=False

print(count)
# Judge status: Accepted
n,k=map(int,input().split())
P=list(map(int,input().split()))
S=[0]*(n+1)
for i in range(n):
   S[i+1]=S[i]+P[i]
ans=0
for i in range(n-k+1):
   ans=max(ans,S[i+k]-S[i])
print((ans+k)/2)
# Judge status: Wrong Answer
n,m = map(int,input().split())
print(n*m-(n+m)*2+4 if min(n,m)!=1 else 2 )
# Judge status: Accepted
a = int(input())
s = input()
print(s if a>=3200 else 'red')
# Judge status: Accepted
import sys
input = sys.stdin.readline

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

n,l=MI()
tastes=[]
sche=n*(n-1)//2+n*l
dif=10**8
for i in range(1,n+1):
    taste=sche-(l+i-1)
    if abs(l+i-1)<dif:
        dif=abs(l+i-1)
        ans=taste
print(ans)
# Judge status: Accepted
def make_divisors(n):
    divisors = []
    for i in range(1, int(pow(n, 0.5)) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return len(divisors)

n = int(input())
cnt = 0
for i in range(1, n + 1):
    if i % 2 != 0:
        res = make_divisors(i)
        if res == 8:
            cnt += 1

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

if a<=x and a+b>=x:
    ans="YES"
else:
    ans="NO"
print(ans)
# Judge status: Wrong Answer
n = int(input())
k = int(input())
x = int(input())
y = int(input())

if x <= k:
    print(n * x)
else:
    print(k * x + (n - k) * y)
# Judge status: Accepted
n = int(input())
for i in range(1,10):
    for j in range(1,10):
        if n == i * j:
            print('Yes')
            exit()
print('No')
# Judge status: Wrong Answer
s = input()
a = 0
n = len(s)

for i in range (n):
    if i % 2 == 0:
        if s[i] != "R":
            a=a+1
    if i % 2 == 1:
        if s[i] != "L":
            a=a+1
if a == len(s):
    print('Yes')
else:
    print('NO')
# Judge status: Wrong Answer
n, m = map(int, input().split())
list_num = list([] for i in range(n))
test = [input().split() for i in range(m)]
check = [0] * n
for i in test:
  list_num[int(i[0]) - 1].append(i[1])
count = 0
count_ac = 0
count_wa = 0
check = 0
for i in list_num:
  for j in range(len(i)):
    if(i[j] =='WA'):
      count += 1
    else:
      count_ac += 1
      check = 1
      break
  if(check == 1):
    count_wa += count
    count = 0
    check = 0 

print(count_ac , count_wa)
# Judge status: Accepted
n = int(input())

qq = []
for i in range(1,10):
  for j in range(1,10):
    if i*j not in qq:
      qq.append(i*j)

print('Yes') if n in qq else print('No')
# Judge status: Wrong Answer
N = int(input())
h = list(map(int, input().split(" ")))

dp = [1000000 for i in range(N)]
dp[0] = 0

for i in range(0, N-1):
    if abs(h[i+1] - h[i]) + dp[i] < dp[i+1]:
        dp[i+1] = abs(h[i+1] - h[i]) + dp[i]
    if i != (N-2):
        if abs(h[i+2] - h[i]) + dp[i] < dp[i+2]:
            dp[i+2] = abs(h[i+2] - h[i]) + dp[i]

print(dp[N-1])
# Judge status: Accepted
n, k = map(int, input().split())
h = list(map(int, input().split()))
h.sort(reverse=True)
i = 0
kaisuu = 0


for i in range(k):
    h[i]=0
    if(i>=n-1):
        break

j = i

for j in range(j, n):
    kaisuu = kaisuu + h[j]

print(kaisuu)
# Judge status: Wrong Answer
from decimal import Decimal

a, b = input().split()
a = Decimal(int(a))
b = Decimal(b)

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

if a+b >= c:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n = int(input())

ans_max = 0
for i in range(1,n+1):
    m = i
    a = 0
    while m % 2 == 0:
        m = m / 2
        a += 1
    if ans_max <= a:
        ans_max = a
        ans = i
print(ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))
ar = list(reversed(a))
b = []
c = []

if len(a)%2 == 0:
    for i in range(len(a)//2):
        b.append(ar[i*2])
        c.append(a[i*2])
else:
    for i in range(-(-(len(a))//2)):
        print (i)
        if i == len(a)//2:
            b.append(ar[(i*2)])
        else:
            b.append(ar[i*2])
            c.append(a[(i*2)+1])

print(' '.join(map(str, b+c)))
# Judge status: Accepted
n = int(input())
if n <= 8:
    print(n)

else:
    
    sn = str(n)
    num = len(sn)
    if sn[1:] == "9" * (num - 1):
        print(int(sn[0]) + 9 *(num - 1))
    else:
        print((int(sn[0]) - 1) + 9 * (num - 1))
# Judge status: Accepted
s = list(input())

words = ['dream', 'dreamer', 'erase', 'eraser']
ans = 'YES'

pointer = len(s)
while pointer > 0:
    if s[pointer-5: pointer] == list(words[0]):
        pointer -= 5
    elif s[pointer-5: pointer] == list(words[2]):
        pointer -= 5
    elif s[pointer-7: pointer] == list(words[1]):
        pointer -= 7
    elif s[pointer-6: pointer] == list(words[3]):
        pointer -= 6
    else:
        ans = 'NO'
        break

print(ans)
# Judge status: Accepted
N, X, T = map(int, input().split())
res = 0
count = 0
while count < N:
    res += T
    count += X
print(res)
# Judge status: Accepted
#! /usr/bin/env python3

# from math import gcd
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

N = input()

hon = [2, 4, 5, 7, 9]
pon = [0, 1, 6, 8]
bon = [3]

if int(N[-1]) in hon:
    print("hon")
elif int(N[-1]) in pon:
    print("pon")
else:
    print("bon")
# Judge status: Wrong Answer
n = int(input())
L = []
value = 0
L = list(map(int, input().split()))

L2 = sorted(L, reverse=True)
value = (L2[n - 2] + L2[n - 1]) / 2
for j in range(n - 2):
    value = (L2[j] + value) / 2

print(value)
# Judge status: Wrong Answer
x = int(input())
ans = 2*x // 11
if ans + 5 < x or 1 <= x <= 5:
  ans += 1
print(ans)
# Judge status: Accepted
import fractions
N=int(input())
ans=1
for i in range(N):
	x=int(input())
	ans=ans*x//fractions.gcd(ans,x)
print(ans)
# Judge status: Accepted

N, M=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
LR=[[int(i) for i in input().split()] for i in range(M)]  # 二次元配列入力　二次元マップみたいな入力のとき

mi, ma = 0, 10**5

for i in LR:
    mi = max(mi, i[0])
    ma = min(ma, i[1])

if ma-mi < 0:
    print(0)
else:
    print(ma-mi + 1)
# Judge status: Wrong Answer
# -*- coding : utf - 8 -*-

w = input()

for i in w:
  if w.count(i) % 2 == 1:
    print("NO")
    exit()
    
print("Yes")
# Judge status: Accepted
s = input()
k = int(input())
l = [(26 - (ord(c) - ord('a'))) % 26 for c in s]
for i in range(len(s) - 1):
    if k >= l[i]:
        k -= l[i]
        s = s[:i] + 'a' + s[i + 1 :]

k %= 26
s = s[:-1] + chr(ord('a') + (ord(s[-1]) - ord('a') + k) % 26)
print(s)
# Judge status: Wrong Answer
from collections import Counter
s = input()
ans=0

for i in range(-1,len(s)*-1-1,-1):
    t = s[len(s)*-1:i]
    if all(l%2==0 for l in Counter(t).values()):
        print(len(t))
        break
# Judge status: Accepted
import math

n, k = map(int, input().split())
ary = [i for i in range(n + 1)]
# print(ary)

mod = 10 ** 9 + 7

ans = 0
min_v = sum(ary[0:(k - 1)])
max_v = sum(ary[(n + 1 - (k - 1)):])
# print(min_v, max_v)
for i in range(k, n + 2):
    min_v += ary[i - 1]
    max_v += ary[(n + 1 - i)]
    # print(min_v, max_v)
    ans = (ans + max_v - min_v + 1) % mod

print(ans)
# Judge status: Wrong Answer
def solve(n):
  res = 0
  while(n != 1):
    if n%2 == 0:
      res += 1
      n /= 2
    else:
      break
  return res

n = int(input())

ans = 0
ans_max = 0
for i in range(1, n+1):
  cnt = solve(i)
  if cnt > ans_max:
    ans_max = cnt
    ans = i
print(ans)
# Judge status: Wrong Answer
N,Q = map(int,input().split())
S = [i for i in input()]
questions = [[i-1 for i in map(int,input().split())] for j in range(Q)]
sums = [0]*N

for i in range(len(S)-1):
  if S[i]=='A' and S[i+1]=='C':
    S[i]='a'
    sums[i+1] = sums[i]+1
  else:
    sums[i+1] = sums[i]
    
print(sums)
    
for q in questions:
  part_S = S[q[0]:q[1]+1]
  ans = sums[q[1]]-sums[q[0]]
  print(ans)
# Judge status: Wrong Answer
S=list(input())
k=int(input())
Ans=[0]*len(S)
for i in range(len(S)):
  if (26-(ord(S[i])-97))%26<=k:
    Ans[i]="a"
    k=k-(26-(ord(S[i])-97)%26)
  else:
    Ans[i]=S[i]
  if i==len(S)-1:
    Ans[i]=chr(((ord(Ans[i])+k%26-97)%26+97))
print("".join(Ans))
# Judge status: Wrong Answer
s = int(input())

tmp = s
MAX_m = 1000001
ans = [0] * MAX_m
for i in range(1, MAX_m):
    if tmp % 2 == 0:
        tmp = tmp//2
    else:
        tmp = 3*tmp + 1

    if tmp in ans:
        print(tmp)
        exit()
    else:
        ans[i] = tmp
# Judge status: Accepted
from fractions import gcd
from functools import reduce
n = int(input())
l = list(int(input()) for _ in range(n))
 
def lcm_base(x,y):
  return x*y//gcd(x,y)
 
def lcm_list(t):
  return reduce(lcm_base,t)
  
print(int(lcm_list(l)))
# Judge status: Accepted
s = input()
len_s = len(s)//2
cnt = 0
for i in range(len_s):
    if s[i] != s[(-i-1)]:
        cnt += 1
print(cnt)
# Judge status: Accepted
s=int(input())
ans=[s]
i=0
while True:
    if s%2==0:
        s//=2
    else:
        s=3*s+1
    if s in ans:
        break
    ans.append(s)
    i+=1
print(i+2)
# Judge status: Accepted
def main():
    x, y = map(int, input().split())

    print(int(x + 0.5 * y))

if __name__ == '__main__':
    main()
# Judge status: Accepted
def count_div(n):
  res = 0
  for i in range(1, n + 1):
    if n % i == 0:
      res += 1
  return res
n = int(input())
ans = 0
for i in range(1, n + 1, 2):
  if count_div(i) == 8:
    ans += 1
print(ans)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,input().split())
if a+e==b+d:
  if b+f==c+e:
    if d+h==e+g:
      if e+i==f+h:
        print('Yes')
print('No')
# Judge status: Accepted
x=int(input())
c=1
for b in range(1,x):
    for p in range(2,x):
        if b**p<=x:c=max(c,b**p)
        else:break
print(c)
# Judge status: Accepted

n = int(input())
a = list(map(int,input().split()))
d = [0]

for i in range(n):
    d.append(d[i] + a[i])

ans = d[-1]

for i in range(n):
    ans =min(ans,abs(d[-1] -2*d[i]))
print(ans)
# Judge status: Wrong Answer
N = int(input()[0])

if N in [2,4,5,7,9]: print("hon")
if N in [0,1,6,8]: print("pon")
if N == 3: print("bon")
# Judge status: Wrong Answer
N = int(input())

ans = 0
L = list(map(int, input().split()))
for i in range(N):
  for j in range(i+1, N):
    for k in range(j+1, N):
      if L[i] + L[j] > L[k] and L[j] + L[k] > L[i] and L[k] + L[i] > L[j]:
        ans += 1
print(ans)
# Judge status: Accepted
N = int(input());

count = [0] * (N+1);

for i in range(N+1):
    tmp = i
    if i != 0:
        while tmp % 2 == 0:
            tmp = tmp /2
            count[i] += 1

max_value = max(count)
num = count.index(max_value)
if num == 0:
    num += 1
print(num)
# Judge status: Wrong Answer
N = input()
H = list(map(int, input().split()))
last_h = float('inf')
cnt, ans = 0, 0
for h in H:
  if h <= last_h:
    cnt += 1
  else:
    ans = max(ans, cnt) # update
    cnt = 0 # reset
  last_h = h
ans = max(ans, cnt)
print(ans)
# Judge status: Accepted
a,b,c=map(int,input().split())
if a%2==1 and b%2==1 and c%2==1:
    print(min(a*b,b*c,c*a))
else:
    print(0)
# Judge status: Accepted
n,m=map(int,input().split())
x=sorted(list(map(int,input().split())))

if n-m>=0: print(0)
else:
    l=[x[i+1]-x[i] for i in range(len(x)-1)] #階差
    ll=sorted(l, reverse=True)
    print(x[-1]-x[0]-sum(ll[0:n-1]))
# Judge status: Wrong Answer
sum = input()

if len(sum) < 3:
    print('0')
else:
    last_2_digit = sum[-2:]
    upper_digit = sum[:-2]

    if last_2_digit == '00':
        print('1')
    else:
        required_num = int(last_2_digit) // 5 + 1
        if int(upper_digit) >= required_num:
            print('1')
        else:
            print('0')
# Judge status: Wrong Answer
n, k = map(int, input().split())
h = [int(i) for i in range(n)]
h.sort()

for i in range(n-k+1):
    a = h[i+k-1]-h[i-1]
    ans = a if i == 0 else min(ans, a)

print(ans)
# Judge status: Accepted
N=int(input())
l=list(map(int,input().split()))
l.sort()
count=0
import bisect
for i in range(N):
    for j in range(i+1,N-1):
        m=bisect.bisect_left(l,l[i]+l[j])
        count+=m-(j+1)
print(count)
# Judge status: Accepted
n = int(input())
hi = list(map(int,input().split()))
maxcount = 0
now = 0
before = 0
for i in hi:
    if before>=i:
        now += 1
    else:
        now = 0
    maxcount = max(maxcount,now)
    before = i
print(maxcount)
# Judge status: Accepted
a, b =map(int, input().split())
s = input()
if s[a] == '-' and s[:a].isdecimal() and s[a+1:].isdecimal():
    print('Yes')
else:
    print('No')
# Judge status: Accepted
x = int(input())
sm=0
res=0
for i in range(1,x+1):
    sm = (i+1)*i/2
    if sm>=x:
        res=i
        break
if sm-x==res:
    print(res-1)
else:
    print(res)
# Judge status: Accepted
n = int(input())
alist = [int(s) for s in input().split(" ")]
asum = alist[0]
for a in alist[1:]:
  asum ^= a

import copy
a_ans = []
for i in range(n):
  asum ^= alist[i]
  a_ans.append(asum)
  asum ^= alist[i]
print(" ".join([str(a) for a in a_ans]))
# Judge status: Wrong Answer
import math

def gcd(p, q):
  if(q==0):
    return p
  else:
    return gcd(q, p%q)

def lcm(p, q):
  m=p/gcd(p,q)
  n=q/gcd(p,q)
  return gcd(p,q)*m*n

def num_div(N, C, D):
  nC=math.floor(N/C)
  nD=math.floor(N/D)
  nCD=math.floor(N/lcm(C,D))
  return nC+nD-nCD

A, B, C, D=map(int, input().split())
M=num_div(B, C, D)-num_div(A-1, C, D)
ans=B-A+1-M
print(ans)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
num2=0
num4=0
kisu=0
for i in range(n):
    if a[i]%4==0:
        num4+=1
    elif a[i]%2==0:
        num2+=1
    else:
        kisu+=1
flag=True
if num4==0:
    if 0<kisu:
        flag=False
else:
    if num2==0:
        if not(kisu<=num4+1):
            flag=False
    else:
        if not(kisu<=num4):
            flag=False
print("Yes" if flag else "No")
# Judge status: Wrong Answer
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, v = rm()
b, w = rm()
t = ri()
if a + v*t >= b + w*t:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
k, x = map(int,input().split())	
if k*500 >= x:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
key = str(input())
a = key.find("A")
z = key.rfind("Z")
print(z-a+1)
# Judge status: Accepted
s = input()
s = s[::-1]
t = input()

if s == t:
    print('YES')
else :
    print('NO')
# Judge status: Accepted
n = int(input())
a = list(input().split())
if n % 2 == 0:
    print(" ".join(a[1::2][::-1] + a[0::2]))
else:
    print(" ".join(a[0::2][::-1] + a[1::2]))
# Judge status: Accepted
n, k = [int(v) for v in input().split()]
hps = sorted([int(v) for v in input().split()], reverse=True)

print(sum(hps[k:]))
# Judge status: Accepted
#!/usr/bin/env python3

s = input()
if s == "AAA" or s == "BBB":
	print("No")
else:
	print("Yes")
# Judge status: Wrong Answer
import math
x,y=map(int,input().split())
print(math.ceil(math.log2(y+1)-math.log2(x)))
# Judge status: Wrong Answer
n,m = map(int,input().split())
ans = 0

if 2*n >= m:
    ans = n
else:
    while 2*n <= m:
        n += 1
        m -= 2
    else:
        ans = n-1

print(ans)
# Judge status: Wrong Answer
def rolling(str , n):
    return str[n:len(str)] + str[:n]

a=list(input())
b=list(input())

for i in range(len(a)):
    if a==b:
        print('Yes')
        exit()
    a=rolling(a,i)
print('No')
# Judge status: Accepted
import sys
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
L=[a,b,c,d,e]
for i in range(4):
  for j in range(i+1,5):
    if abs(L[i]-L[j])>k:
      print(":(")
      sys.exit()
print("Yay!")
# Judge status: Accepted
X, Y = list(map(int, input().split()))
cnt = 1
while X <= Y:
    X *= 2
    cnt += 1
print(cnt - 1)
# Judge status: Accepted
import sys

S = input()
T = input()

for i in range(len(S)):
    s = S[i:] + S[:i]

    if T == s:
        print('Yes')
        sys.exit()

print('No')
# Judge status: Accepted
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    count = [0] * 10 ** 5
    for i in A:
        if i > 1:
            count[i - 1] += 1
        count[i] += 1
        if i < 10**5-1:
            count[i + 1] += 1
    print(max(count))
resolve()
# Judge status: Accepted
#-*-coding:utf-8-*-

from collections import Counter

def main():
    n = int(input())
    numbers=[]
    answers=[]
    number=0
    numbers=[int(input()) for _ in range(n)]
    Numbers_col = Counter(numbers)

    for number in Numbers_col.values():
        if number%2!=0:
            answers.append(number)
    print(len(answers))

if __name__=="__main__":
    main()
# Judge status: Accepted
n=int(input())
k=int(input())
x=int(input())
y=int(input())
if n>k:
  print(k*x+(n-k)*y)
else:
  print(n*x)
# Judge status: Accepted
a, b = map(int, input().split())
if a % 3 and b % 3 and (a + b) % 3:
    print("Impossible")
else:
    print("Possible")
# Judge status: Accepted
n = int(input())
tp, xp, yp = 0, 0, 0
for _ in range(n):
    t, x, y = map(int, input().split())
    td = t - tp
    xd = x - xp
    yd = y - yp
    if td < abs(xd) + abs(yd) or (td - abs(xd) - abs(yd)) % 2 == 1:
        print('No')
        break
    tp = t
    xp = x
    yp = y
else:
    print('Yes')
# Judge status: Accepted
def main():
    n=int(input())
    a=list(map(int, input().split()))
    b=list(map(int, input().split()))
    
    al = sum(a)
    for i in range(n):
        a[i] -= b[i]
        if a[i] < 0:
            a[i+1] += max(-a[i+1], a[i])
            a[i] = 0
    print(al-sum(a))
    
if __name__ == "__main__":
    main()
# Judge status: Accepted
S = input()
group = set(S)
count = 0
if len(group) == 2:
    for _ in S:
        if _ == list(group)[0]:
            count += 1

if count == 2:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
#B - Qualification simulator
N,A,B = map(int,input().split())
S = input()
S = list(S)

capacity = A + B
candidate = 0
overseas = 0
for i in S:
    if i == 'a' and candidate < capacity:
        candidate += 1
        print('Yes')
    elif i == 'b' and candidate < capacity and overseas < B:
        candidate += 1
        overseas += 1
        print('Yes')
    else :
        print('No')
# Judge status: Accepted
import numpy as np

N, K = map(int, input().split())
H = list(map(int, input().split()))

DP = np.zeros(N, dtype=int)
H = np.array(H)

for i in range(1, N):
    start = max(0, i-K)
    DP[i] = min(DP[start:i] + np.abs(H[i] - H[start:i]))

print(DP[-1])
# Judge status: Accepted
import sys
N = int(input())
c = list(input())
#print(c)
myr_cnt = c.count('R')
if myr_cnt == 0:
    print(0)
    sys.exit()
#print(myr_cnt)
myw_cnt = 0
for i in range(myr_cnt):
    if c[i] == 'W':
        myw_cnt += 1
print(myw_cnt)
# Judge status: Accepted
a,b,x=map(int,input().split())
c=a+b


if x<=c:
    if a>x:
        print('NO')
    else:
        print('YES')
else:
    print('NO')
# Judge status: Accepted
H = int(input())
W = int(input())
N = int(input())

from math import ceil
count = N / max(H, W)
print(ceil(count))
# Judge status: Accepted
S = list(input())
A = []
for i in S:
  if i in A:
    A.remove(i)
  else:
    A.append(i)
if len(A) == 0:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
l=[list(map(int,input().split())) for i in range(3)]

sum_l=0
ans="No"

for i in l:
  sum_l+=sum(i)
  
if sum_l%3==0 or sum_l==0:
  ans="Yes"

print(ans)
# Judge status: Wrong Answer
k, n = map(int, input().split())
A = list(map(int, input().split()))
ans = 0
for i in range(n):
    A[i] = A[i] - A[0]
    if abs(A[i]) >= k/2:
        A[i] = abs(A[i]) - k
A.sort()
#print(A)
ans = A[n-1] - A[0]
print(ans)
# 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()
b.sort()
c.sort()

ans = 0
# (i, j, k) -> Fix j

for i in b:
    lower = bisect.bisect_left(a, i)
    higher = n - (bisect.bisect_right(c, i))
    ans += lower * higher

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

if(m==n):print("Yes")
else:print("No")
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))

A=sorted(A)[::-1]
a=0
b=0

for i in range(N):
    if i%2==0:
        a+=A[i]
    else:
        b+=A[i]
        
print(a-b)
# Judge status: Accepted
import fractions
def lcm(x,y):
    return x*y/fractions.gcd(x,y)

a,b=map(int, input().split(' '))

print(int(lcm(a,b)))
# Judge status: Accepted
S = input()
M = len(S)
N = set(S)
O = list(N)
P = len(O)
if M == P:
  print('yes')
else:
  print('no')
# Judge status: Accepted
N=int(input())
num=[i for i in range(1,N+1)]
X=[]

for i in range(N):
    S,P=map(str,input().split())
    X.append([num[i],S,int(P)])

X = sorted(X,key=lambda d:d[2],reverse=True)
X = sorted(X,key=lambda d:d[1])

for i in X:
    print(i[0])
# Judge status: Accepted
X, A, B = map(int, input().split())
if A-B >= 0:
    print('delicious')
elif A-B >= -X:
    print('safe')
else:
    print('dangerous')
# Judge status: Accepted
N, D = list(map(int, input().split()))
XY = [[] for i in range(N)]
for i in range(N):
    XY[i] = list(map(int, input().split()))

a = 0
for xy in XY:
    ans = (xy[0] **2 + xy[1] **2)
    if ans <= D **2:
        a += 1
print(a)
# Judge status: Accepted
n = int(input())
s = 'abcdefghij'

def ans(a, c):
    if len(a)==n-1:
        for i in range(c):
            print(a+s[i])
    else:
        for i in range(c):
            a+=s[i]
            if i==c-1:
                ans(a, c+1)
            else:
                ans(a,c)
            a=a[0:-1]

ans('', 1)
# Judge status: Accepted
N = int(input())
S = input()
x = 0
ans = 0
for i in S:
  if i == "I": x += 1
  else: x -= 1
  ans = max(ans,x)
print(ans)
# Judge status: Accepted
X = int(input())
if X in [3, 5, 7]:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
N,M = map(int,input().split())
plan = list(map(int,input().split()))
sum = N
for i in range(M):
  sum = sum - plan[i]

if 0 <= sum <= N:
  print(sum)

else:
  print('-1')
# Judge status: Accepted
def eratosthenes(n):
    l = [i for i in range(2, n + 1)]
    for i in range(2, int(n ** 0.5) + 1):
        l = [j for j in l if j % i != 0 or i == j]
    return l

x = int(input())
l = eratosthenes(2 * (10 ** 5))
for i in l:
    if x <= i:
        print(i)
        exit()
# Judge status: Wrong Answer
a, b, k = map(int, input().split())
n = 0
for i in range(1, a + 1):
    if not a % i and not b % i:
        n += 1
    if n == k:
        print(i)
        exit()
# Judge status: Accepted
N = int(input())
a = list(map(int,input().split()))
four = 0
two = 0
flag = False
for i in a:
    if i%4 == 0:
        four += 1
    elif i%2 == 0:
        two += 1
if two > 1:
    N -= two
    N -= 2
    four -= 1
    flag = True
N -= 2*(four-1)+(3-flag)
if N > 0:
    print("No")
else:
    print("Yes")