peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n, m = map(int, input().split())
checker = [1 for _i in range(n+1)]
r = [0 for i in range(n+1)]
r[1] = 1
for _i in range(m):
    x, y = map(int, input().split())
    checker[x] -= 1
    checker[y] += 1
    if r[x]>0:
        r[y] = 1
    if (r[x]>0) and (checker[x]==0):
        r[x] = 0
print(sum(r))
# Judge status: Accepted
s=input()
n=len(s)
d=[0]
d10=[0,1,10]
for i in range(n):
    d10.append(d10[-1]*10%2019)
for i in range(1,n+1):
    d.append((d[-1]+int(s[-i])*d10[i])%2019)
import collections
c=collections.Counter(d)
ans=0
for i in c.values():
    ans+=i*(i-1)//2
print(ans)
# Judge status: Accepted
H = int(input())
W = int(input())
N = int(input())

def ceil_div(a, b):
    return (a + b - 1) // b

print(ceil_div(N, max(H, W)))
# Judge status: Accepted
we=["SUN","MON","TUE","WED","THU","FRI","SAT" ]
N=input()
for i in range(7):
    if we[i]==N:
        print(7-i)
        break
# Judge status: Accepted
a,b,c = map(int, input().split())
 
if c-a-b > 0 and 4*a*b < pow(c-a-b, 2):
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
A, B, C = map(int, input().split())

if A <= C <= B:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
s = input()
n = len(s)

for i in range(2**(n-1)):
    x = [s[0]]
    for j in range(n-1):
        if (i>>j)&1:
            y ='+'
        else:
            y = '-'
        x.append(y)
        y = 0
        x.append(s[j+1])
    z = ''.join(x)
    if eval(z) == 7:
        print(z + '=7')
        break
# Judge status: Accepted
N = int(input())
S = input()

l = 0
r = S.count("E", 1, len(S))
ans = l + r
for i in range(1, len(S)):
    if S[i] == "E":
        r -= 1
    if S[i - 1] == "W":
        l += 1

    ans = ans if ans <= l + r else l + r

print(ans)
# Judge status: Wrong Answer
import sys
def input():
  return sys.stdin.readline()#[:-1]

def main():
  a = list(map(int, input().split()))
  print(sum(a))
    
if __name__ == '__main__':
  main()
# Judge status: Accepted
import collections
n=int(input())
a=list(map(int, input().split(' ')))
c = collections.Counter(a)

def n_c_2(val):
  ret = 0
  if val > 1:
    ret = (val)*(val-1)//2
  return ret

org_nc2 = {}
org_minus1_nc2 = {}
sumall = 0
for k in list(c.keys()):
  org_nc2[k] = n_c_2(c[k])
  org_minus1_nc2[k] = n_c_2(c[k] - 1)
  sumall += org_nc2[k]
for d in a:
  ans = sumall - org_nc2[d] + org_minus1_nc2[d]
  print (ans)
# Judge status: Accepted
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq

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

p = m // 2
for i in range(p):
    print(p-i,p+2+i)

q = m // 2 + 1
if m % 2 == 1:
    for i in range(q):
        print(m+q-i,m+q+i+1)
else:
    for i in range(q-1):
        print(m+q-i,m+q+i+1)
# Judge status: Wrong Answer
N = int(input())
for i in range(1, N+1):
    if i*i > N:
        print((i-1)*(i-1))
        exit()
print(0)
# Judge status: Accepted
s = list(map(int,list(input())))
a = s[0]*10+s[1]
b = s[2]*10+s[3]
if a == 0 and b == 0:
    print('NA')
    exit()
if 0 < a<= 12 and (b>12 or b==0):
    print('MMYY')
elif (a > 12 or a==0) and 0 < b <= 12:
    print('YYMM')
elif a <= 12 and b <= 12:
    print('AMBIGUOUS')
else:print('NA')
# Judge status: Accepted
def main():
    n = int(input())
    count = 0
    for _ in range(n):
        a, b = [int(x) for x in input().split()]
        if a == b:
            count += 1
        else:
            count = 0

        if count >= 3:
            return 'Yes'
    return 'No'


if __name__ == '__main__':
    print(main())
# Judge status: Wrong Answer
N = int(input())

ans = 0
List = []
for i in range(N):
    A = int(input())
    ans += A // 2
    A %= 2
    List.append(A)

for i in range(N - 1):
    if List[i] == List[i + 1] == 1:
        ans += 1

print(ans)
# Judge status: Accepted
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
cb_list = []
for i in range(m):
  b, c = map(int, input().split())
  cb_list.append((c, b))

cb_list.sort(key=lambda x: x[0], reverse=True)

elim_count = 0
for i in range(m):
  c,b = cb_list[i]
  a.extend([c] * b)
  if len(a) >= 2*n:
    break

a.sort(reverse=True)
print(sum(a[:n]))
# Judge status: Accepted
n,m,k = map(int,input().split())

def hantei(n,m,k):
    for i in range(n+1):
        for j in range(m+1):
            if i*m + j*(n-2*i)==k:
                return True
    return False

print("Yes" if hantei(n,m,k) else "No")
# Judge status: Accepted
MOD = 10**9+7
x, y = map(int, input().split())
n, r1 = divmod(2*y-x, 3)
m, r2 = divmod(2*x-y, 3)


def com(n, r):
    X = Y = 1
    if r < 0 or n < r:
        return 0
    if n-r < r:
        r = n-r
    for i in range(1, r+1):
        Y = Y*i % MOD
        X = X*(n-i+1) % MOD
    Y = pow(Y, MOD-2, MOD)
    return X*Y


if r1 or r2:
    print(0)
else:
    print(com(n+m, n) % MOD)
# Judge status: Accepted
l=list(map(int,input().split()))
for i in range(len(l)):
    if(l[i]==0):
        print(i+1)
        break
# Judge status: Accepted
f=True
s=input()
if s[0]!="A":f=False
if s.count("C")==0 or s.count("C")>=2:f=False
else:
    i=s.index("C")
    if i==1 or i==len(s)-1:f=False
    else:
        for x in range(len(s)):
            if x==i or x==0:continue
            if s[x].isupper():f=False
if f:print("AC")
else:print("WA")
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

ret = [0] * n
for i in range(n):
    ret[i] = b[i] - a[i]
ret = sorted(ret)

cnt = 0
for i, val in enumerate(ret):
    if val < 0:
        cnt += abs(val)
        ret[i] = 0
    elif val % 2 == 1:
        cnt += 1
        ret[i] -= 1

for i, val in enumerate(ret):
    cnt -= val // 2
if cnt <= 0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
S = input().strip()
print("yes" if len(S) == len(set(list(S))) else "no")
# Judge status: Accepted
n = int(input())

res=set()
for i in range(1, 10):
  for j in range(1, 10):
    res.add(i * j)
if n in res:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
import sys

stdin = sys.stdin

mod = 1000000007
inf = 1 << 60

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

n, k = na()
s = ns()
t = [s[i] for i in range(n)]
t[k - 1] = t[k - 1].lower()

for i in range(n):
	print(t[i], end='')
print()
# Judge status: Accepted
from heapq import heapify, heappush, heappop
N, K = map(int, input().split())
H = list(map(int, input().split()))

H = [-h for h in H]
heapify(H)
for _ in range(K):
    if len(H) == 0:
        break
    heappop(H)

print(-sum(H))
# Judge status: Accepted
n = int(input())
al = list(map(int, input().split()))

a_s = sorted(al, reverse=True)
strength = 0

for i in range(1, 2*n+1, 2):
    strength += a_s[i]

print(strength)
# Judge status: Accepted
line = input().split(' ')
D = float(line[0])
T = float(line[1])
S = float(line[2])

if D / S <= T:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
s = input()
zero = 0
one = 0

for i in s:
    if i == "0":
        zero += 1
    else:
        one += 1
        
res = min(zero, one) * 2
print(res)
# Judge status: Wrong Answer
n, m = map(int, input().split())
for i in range(m):
  print(str(i+1)+" "+str(n-i-1))
# Judge status: Accepted
a, b = map(int, input().split())

a_pulus = a >= 0
b_pulus = b >= 0
a_minus = a < 0
b_minus = b < 0

if a_pulus & b_pulus:
    print("Positive")
elif a_minus & b_pulus:
    print("Zero")
else:
    if (b - a + 1) % 2 == 0:
        print("Positive")
    else:
        print("Negative")
# Judge status: Accepted
S = input()
if S[-1] != 's':
    S += 's'
else:
    S += 'es'
print(S)
# Judge status: Wrong Answer
from math import log
def calc_log2_int(n):
  """
  calc maximum integer m, such that 2 ^ m <= n 
  """
  candidate = int(log(n, 2))
  if pow(2, candidate + 1) == n:
      return candidate + 1
  else:
      return candidate


x, y = map(int, input().split())
n = y // x
print(calc_log2_int(n) + 1)
# Judge status: Accepted
l,r = map(int,input().split())

if r-l >= 2018:
  print(0)
else:
  ans = 2019
  for i in range(l,r):
    for j in range(i+1,r+1):
      ans = min(ans,(i*j)%2019)
  print(ans)
# Judge status: Accepted
a, b = map(int,input().split())
if a > 0 and b > 0:
    print("Positive")
elif a <= 0 and b >= 0:
    print("Zero")
elif (b - a + 1) % 2 == 0:
    print("Positive")
else:
    print("Negative")
# Judge status: Accepted
n,m,x,y=map(int,input().split())
X=max(list(map(int,input().split())))
Y=min(list(map(int,input().split())))
print("No War" if any([X<z<=Y for z in range(x+1,y+1)]) else "War")
# Judge status: Accepted
K = int(input())
A, B = [int(i) for i in input().split()]
print('OK' if (A + K - 1) // K <= B // K else 'NG')
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if (a+b+c)//a==2 or (a+b+c)//b==2 or (a+b+c)//c==2:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N = int(input())
res = 0
for i in range(N):
    res += i + 1
print(res)
# Judge status: Accepted
n = int(input())
S = [input() for _ in range(n)]


from collections import Counter
Alphabet = 'abcdefghijklmnopqrstuvwxyz'

A = [51 for _ in range(26)]
C = [[] for _ in range(n)]
for i, s in enumerate(S):
    C[i] = Counter(s)
    for j, a in enumerate(Alphabet):
#        print(A[j])
        A[j] = min([A[j], C[i][a]])
ans = ''
for a, c in zip(Alphabet, A):
    ans += a*c
#    print(a, c, ans)
print(ans)
# Judge status: Accepted
n, k = map(int, input().split())
hn = list(map(int, input().split()))

if k >= n:
  print(0)
else:
  hn.sort(reverse=True)
  print(sum(hn[k:]))
# Judge status: Wrong Answer
a=input()
a.replace(a[3],"8").replace(a[2],"1").replace(a[1],"0").replace(a[0],"2")
print(a)
# Judge status: Accepted
s = input()
first = int(s[:2])
second = int(s[2:])
if 1 <= first <= 12:
  if 1 <= second <= 12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if 1 <= second <= 12:
    print('YYMM')
  else:
    print('NA')
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    a = list(map(int, rl().split()))
    b = list(map(int, rl().split()))
    
    d = sum(b) - sum(a)
    cnt = 0
    for i in range(N):
        if a[i] < b[i]:
            cnt += (b[i] - a[i] + 1) // 2
    if cnt <= d:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    solve()
# Judge status: Accepted
N = int(input())
s = input()
def f(s):
    d = 0
    for i in range(len(s)):
        if s[i] == "(":
            d += 1
        else:
            d -= 1
        if d < 0:
            return "("+s
    if d > 0:
        return s+")"
    else:
        print(s)
        exit(0)
while True:
    s = f(s)
# Judge status: Accepted
import bisect
import collections

N=int(input())

line=collections.deque()

for _ in range(N):
    A=int(input())
    index=bisect.bisect_left(line,A)
    if index==0:
        line.appendleft(A)
    else:
        line[index-1]=A
    #print(line)
    
    #print(line)

print(len(line))
# Judge status: Accepted
l = float(input())
print("{:.10f}".format((l ** 3) / 27))
# Judge status: Accepted
def main(n: int, a: int, b: int):
    if a > b:
        print(0)
        return

    if n == 1:
        if a == b:
            print(1)
        else:
            print(0)
        return

    if n == 2:
        if a > b:
            print(0)
        else:
            print(1)
        return

    print((n - 2) * (b - a) + 1)


if __name__ == "__main__":
    n, a, b = map(int, input().split())

    main(n, a, b)
# Judge status: Accepted
n = int(input())
s = input()
l = []
for i in range(n):
    l.append(s[i])
ans = 0
for m in range(n):
    sx = set(l[0 : m])
    sy = set(l[m:])
    ans = max(ans, len(sx & sy))
print(ans)
# Judge status: Accepted
def main():
    A = [int(i) for i in input().split()]
    if any(a % 2 == 0 for a in A):
        return print(0)
    A.sort()
    print(A[0]*A[1])


if __name__ == '__main__':
    main()
# Judge status: Accepted
n = int(input())
luca = [0]*(n+1)
luca[0] = 2
luca[1] = 1
for i in range(2, n+1):
    luca[i] = luca[i-1] + luca[i-2]
print(luca[n])
# Judge status: Accepted
s = input()
weather= ['Sunny', 'Cloudy', 'Rainy']
index = weather.index(s)
print(weather[(index + 1) % 3])
# Judge status: Accepted
def solve():
    X = int(input())

    ans = 0
    if X <= 3:
        ans = 1
    else:
        for b in range(2,100):
            if b ** 2 > X:
                break
            p = 2
            while pow(b,p) <= X:
                p += 1
            else:
                ans = max(ans, pow(b,p-1))
    
    print(ans)

if __name__ == '__main__':
    solve()
# Judge status: Accepted
S = input()
T = input()
a = 0

for i, word in enumerate(S):
    if word == T[i]:
        pass
    else:
        a += 1
print(a)
# Judge status: Accepted
h,a = map(int, input().split())
n = h//a
m = h%a
if m == 0:
    print(n)
else:
    print(n + 1)
# Judge status: Accepted
n, m = map(int, input().split())
s = [list(map(int, input().split())) for _ in range(n)]
c = [list(map(int, input().split())) for _ in range(m)]
ans = [0]*n

for i in range(n):
    l = float('inf')
    for j in range(m):
        ls = abs(s[i][0]-c[j][0]) + abs(s[i][1]-c[j][1])
        if l > ls:
            l = ls
            ans[i] = j+1
for i in ans:
    print(i)
# Judge status: Wrong Answer
N = int(input())
AB = [list(map(int,input().split())) for _ in range(N)]
AB.reverse()
count = 0

for a,b in AB:
  num_a = a+count
  if num_a%b != 0 or num_a == 0:
    count += (b-num_a%b)
print(count)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))

a.sort()

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

print(min(b))
# Judge status: Accepted
N,K,Q = map(int,input().split(" "))
score = [0]
for _ in range(N):
    score.append(K)

for _ in range(Q):
    ans = int(input())
    score[ans] +=1

for i in range(1,N+1):
    if score[i] > Q:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
import math

x = int(input())

while True:
    flag = True
    for i in range(2, int(math.sqrt(x))):
        if x % i == 0:
            flag = False

    if flag:
        print(x)
        exit()
    else:
        x += 1
# Judge status: Accepted
n=int(input())
count=0
b=n
while b:
    b//=10
    if b:
        count+=1
if count==0:
    print(n)
elif count==1:
    print(9)
elif count==2:
    print(n-100+1+9)
elif count==3:
    print(900+9)
elif count==4:
    print(n-10000+1+909)
elif count==5:
    print(90909)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
for i in range(1,n):
    if ans<sum(a[:i])+sum(b[i:])+b[i-1]:
        ans=sum(a[:i])+sum(b[i:])+b[i-1]
print(ans)
# Judge status: Accepted
N = int(input())

ans = 0

d = 2
while d * d <= N:
  e = 0
  while N % d == 0:
    e += 1
    N //= d
  i = 1
  while i <= e:
    ans += 1
    e -= i
    i += 1
  d += 1

if N > 1:
  ans += 1
print(ans)
# Judge status: Wrong Answer
H = 10
A = 2

if H % A == 0:
    print(int(H/A))
else:
    print((H//A) + 1)
# Judge status: Wrong Answer
N, A, B = map(int, input().split())

ans = (N - 2) * B - (N - 2) * A + 1
print(ans)
# Judge status: Accepted

a,b = map(int,input().split())
c = list(map(int,input().split()))
j = 0

for i in range(a-b):
    if int(c[i]) < int(c[b+j]):
        print("Yes")
        j += 1
    else:
        print("No")
        j += 1
# Judge status: Accepted
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

def main(N):
  A = [1]
  for _ in range(100):
    A.append(A[-1] * 26)
  for n in range(1, 100):
    if N > A[n]:
      N -= A[n]
      continue

    N -= 1
    ret = []
    
    for _ in range(n):
      N, r = divmod(N, 26)
      ret.append(r)
    break
  ret = [chr(ord('a') + x) for x in ret]
  return ''.join(reversed(ret))
 
print(main(N))
# Judge status: Wrong Answer
import numpy as np
def main():
    a, b = map(int, input().split())
    for k in range(min(a,b), max(a,b)+1):
        ak = np.abs( a - k )
        bk = np.abs( b - k )
        if ak == bk:
            print(( a + b ) / 2)
            exit(0)
    print("IMPOSSIBLE")

if __name__ == "__main__":
    main()
# Judge status: Accepted
menu = []

for i in range(5):
    i = int(input())
    menu.append(i)

from itertools import permutations
from math import ceil

min_sum = 10**10
for i in permutations(menu, 5):
    sum = 0
    for j in range(4):
        sum += ceil(i[j]/10) * 10
    sum += i[4]
    if sum < min_sum:
        min_sum = sum

print(min_sum)
# Judge status: Wrong Answer
a,b=map(int,input().split())
c=1
for i in range(2,int(max(a**.5,b**.5))+2):
    if a%i==0==b%i:
        c+=1
        print(i,a,b)
    while a%i==0:
        a//=i
    while b%i==0:
        b//=i
if a%b==0 or b%a==0:
    c+=1
print(c)
# Judge status: Accepted

x = int(input())
ans = 1

for i in range(1,32):
    for j in range(2,11):
        if i ** j > x:
            pass
        else:
            if ans < i ** j:
                ans = i ** j
#                print(i,j)

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

pos = 0
neg = 0

for i in range(n):
    dif = b[i]-a[i]

    if dif > 0:
        pos += dif//2
    elif dif < 0:
        neg += dif

neg = abs(neg)

print("Yes" if pos >= neg else "No")
# Judge status: Accepted
n = int(input())
print('Yes') if n%9 == 0 else print('No')
# Judge status: Accepted
n, k = map(int, input().split())
list = list(map(int, input().split()))

if k>=n:
	print(0)
else:
	list.sort()
	ans = sum(list[:n-k])
	print(ans)
# Judge status: Accepted
s=input()
n=len(s)
ans=0
for i in range(n):
  for j in range(i,n):
    if all("ACGT".count(c) for c in s[i:j+1]):
      ans=max(ans,j-i+1)
print(ans)
# Judge status: Accepted
W,H,N = map(int,input().split())
x_r = W
x_l = 0
y_r = H
y_l = 0

for _ in range(N):
    x,y,a = map(int,input().split())
    if a == 1:
        x_l = max(x,x_l)
    elif a == 2:
        x_r = min(x,x_r)
    elif a == 3:
        y_l = max(y,y_l)
    else:
        y_r = min(y,y_r)


print(max(0,(x_r-x_l))*max(0,(y_r-y_l)))
# Judge status: Wrong Answer
a, b = list(map(int, input().split()))
if a % 3 == 0 or b % 3 == 0 or a + b % 3 == 0:
  print('Possible')
else:
  print('Impossible')
# Judge status: Accepted
s = input()

substring = set(['A', 'C', 'G', 'T'])

MAX = 0
i = 0
while i < len(s):
    t = 0
    for j in range(i, len(s)):
        if s[j] in substring:
            t += 1
        else:
            break
    i += 1
    MAX = max(MAX, t)
print(MAX)
# Judge status: Wrong Answer
x=int(input())
data=[x//100+2,x//101+2,x//102+2,x//103+2,x//104+2]
for i in range(data[0]):
  for j in range(data[1]):
    for k in range(data[2]):
      for l in range(data[3]):
        for m in range(data[4]):
          if (x-(100*i+101*j+102*k+103*l+104*m))%105==0:
            print(1)
            exit()
print(0)
# Judge status: Accepted
x, y, z = map(int, input().split())
ans = y * x // 2
print(ans)
# Judge status: Accepted
n=int(input())
d = {}
for i in range(26):
  d[chr(ord("a")+i)]=10**9
for i in range(n):
  s=input()
  for j in range(26):
    d[chr(ord("a")+j)]=min(d[chr(ord("a")+j)], s.count(chr(ord("a")+j)))

ans = ""
for e in d.items():
  ans+=e[0]*e[1]
print(ans)
# Judge status: Accepted
l=list(map(int,input().split()))
a = l[0]
b = l[1]
c = l[2]


print(max(c - (a-b), 0))
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))
a.sort()
print(sum(a[n:3*n-n]))
# Judge status: Wrong Answer
n,m = map(int,input().split())
a=[]
for _ in range(n):
  a.append(list(map(int,input().split())))

x = [0]*m

for i in range(n):
  for k in range(a[i][0]):
    x[a[i][k]-1] += 1
count = 0
for i in range(m):
  if x[i] == n:
    count += 1
print(count)
# Judge status: Wrong Answer
a,b = map(int,input().split())

div = b/a

n = 0

while 2**n <= div:

    n +=1

print(n)
# Judge status: Accepted
N = int(input())
S = list(input())

cntW = 0
for s in S:
    if s == '.':
        cntW += 1

cntB = 0
MIN = 10 ** 5
for i in range(N+1):
    MIN = min(cntW+cntB,MIN)
    if i < N:
        if S[i] == '#':
            cntB += 1
        else:
            cntW -= 1

print(MIN)
# Judge status: Wrong Answer
#N=int(input())
#N,M=map(int, input().split())
#L=list(map(int, input().split()))
N,M=map(int, input().split())
ifacL=[0]*N
psL=[]
AC=0
WA=0
for _ in range(M):
  psL.append(list(map(str, input().split())))

for i in range(M):
  if ifacL[int(psL[i][0])-1]==0 and psL[i][1]=="WA":
    WA+=1
  elif ifacL[int(psL[i][0])-1]==0 and psL[i][1]=="AC":
    AC+=1
    ifacL[int(psL[i][0])-1]=1

print(AC,WA)
# Judge status: Accepted
n = int(input())
t = 0
x = 0
y = 0
for _ in range(n):
	nt, nx, ny = map(int,input().split())
	sa = nt-t
	t = nt
	kyori = abs(nx-x) + abs(ny-y)
	x = nx
	y = ny
	if kyori > sa or (sa-kyori) % 2 == 1:
		print("No")
		exit()
print("Yes")
# Judge status: Accepted
i = list(map(int, input().split()))
if i[2]-i[1]-i[0]<0:
    print('No')
elif 4*i[0]*i[1]<(i[2]-i[1]-i[0])**2:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
from fractions import gcd
from math import sqrt

a,b = map(int,input().split())
n = gcd(a,b)
k = n
s = set()
s.add(1)
for i in range(2,int(sqrt(n))+1):
  while n%i == 0:
    n = n//i
    s.add(i)
  if n == 1:
    break
  s.add(n)
if len(s) == 1 and k != 1:
  print(len(s)+1)
else:
  print(len(s))
# Judge status: Accepted
a,b,c=map(int, input().split())     
print("YES" if b-a==c-b else "NO")
# Judge status: Accepted
N, K = map(int, input().split())
A = [int(i) for i in input().split()]
A.sort()
for i in range(1, N):
    if A[i] != A[0]:
        idx = i
        break
# int((N - idx) / K)
if (N - idx) % (K - 1) == 0:
    print(int((N - idx) / (K - 1)))
else:
    print(int((N - idx) / (K - 1)) + 1)
# Judge status: Accepted
s=list(input())
K=int(input())
alp=["a","b","c","d","e","f","g",
"h","i","j","k","l","m","n",
"o","p","q","r","s","t","u",
"v","w","x","y","z"]

for i in range(len(s)):
    n=alp.index(s[i])
    if n!=0 and n+K>=26:
        s[i]="a"
        K-=26-n
    if i==len(s)-1 and K>0:
        n=alp.index(s[i])
        s[i]=alp[(n+K)%26]

for j in s:
    print(j,end="")
print()
# Judge status: Accepted
a, b, c = map(int, input().split())
if a+b >= c:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N, K = input().split(" ")
N, K = int(N), int(K)
d = []
A = []
for k in range(K):
    d.append(int(input()))
    A += [int(a) for a in input().split(" ")]

ans = 0
for n in range(N):
    if A.count(n+1) == 0:
        ans += 1
print(ans)
# Judge status: Accepted
#116-B（Collatz Problem）
a = []
s = input()
s = int(s)
a.append(s)

i = 0
while i <= 1000000:
    n = a[-1]
    n = int(n)
    if n % 2 == 0:
        C = n / 2
    else:
        C = n * 3 + 1
    if C in a:
        a.append(C)
        break
    a.append(C)
print(len(a))
# Judge status: Wrong Answer
N = int(input())
H = list(map(int, input().split()))
base = H[-1]
cnt = 0
ans = 0
for h in H[N-2::-1]:
    if base <= h:
        cnt += 1
    else:
        ans = max(ans, cnt)
        cnt = 0
    base = h
print(max(ans,cnt))
# Judge status: Wrong Answer
N, K = map(int, input().split())
S = list(input()+"X")

temp = S[0]
cnt = 1
c_cnt = 1
ans = 0

for i in range(1, N+1):
  if temp == S[i]:
    cnt += 1
  else:
    ans += cnt - 1
    cnt = 1
    c_cnt += 1
    temp = S[i]
  #print(ans, cnt, c_cnt, temp)

#最後の余計な分
c_cnt -= 1

if c_cnt//2 <= K:
  ans += (c_cnt//2) * 2 -1
else:
  ans += K * 2

print(ans)
# Judge status: Wrong Answer
N = int(input())
N=N/2
print(round(N))
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
cnt=[0]*9
for i in a:
  cnt[min(i,3200)//400]+=1
print(max(len(cnt)-cnt.count(0)-min(cnt[-1],1),1),len(cnt)-cnt.count(0)+max(0,cnt[-1]-1))
# Judge status: Accepted
_ = input()
a = [int(x) for x in input().split()]

odd = []
m4 = []
m2 = 0
for i in a:
    if i % 2 != 0:
        odd.append(i)
    elif i % 4 == 0:
        m4.append(i)
    else:
        m2 = 1
else:
    lodd = len(odd)
    if lodd == 0 or lodd + m2 - 1 <= len(m4):
        print("Yes")
    else:
        print("No")