peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

def main():
    w,h,x,y=L()
    print(w*h/2,end=" ")
    print(1 if w//2==x and h//2==y else 0)
    

if __name__=='__main__':
    main()
# Judge status: Accepted
X, Y, Z = map(int, input().split())
print("%d %d %d"%(Z, X, Y))
# Judge status: Wrong Answer
N=int(input())
s=[str(input()) for i in range(N)]

count = N
exlist = []
for i in range(N-1):
    if i in exlist:
        break
    for j in range(i+1,N):
        if s[i]==s[j]:
            count=count-1
            exlist.append(j);
            break


print(count)
# Judge status: Accepted
n = int(input())
s = sorted([int(input()) for i in range(n)])
ans = sum(s)
d = ans
for i in s:
  if i % 10 != 0:
    d = i
    break
if ans % 10 != 0:
  print(ans)
else:
  print(ans - d)
# Judge status: Wrong Answer
S = input()

print("2018/01/" + S[8:9])
# Judge status: Wrong Answer
import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N,M = map(int,input().split())
A = list(map(int,input().split()))
LCM = lcm_list(A)
print(int(((2*M)/LCM+1)/2))
# Judge status: Wrong Answer
from sys import stdin, stdout
from time import perf_counter

import sys
sys.setrecursionlimit(10**9)
mod = 10**9+7

# import sys
# sys.stdout = open("e:/cp/output.txt","w")
# sys.stdin = open("e:/cp/input.txt","r")

n,l = map(int,input().split())
a = [input() for item in range(n)]
print(''.join(a))
# Judge status: Accepted
N,M = map(int, input().split())

ans = set([0])
cnt = [1] * N
for _ in range(M):
    x,y = [int(i) - 1 for i in input().split()]
    cnt[x] -= 1; cnt[y] += 1
 
    if x in ans:
        ans.add(y)
        if cnt[x] == 0: # 絶対に赤いボールがyに移される
            ans.remove(x)
 
print(len(ans))
# Judge status: Wrong Answer
n, a, b = list(map(int, input().split()))
sum = 0

for i in range(n):
    s_sum = 0
    c = i
    while c>0:
        s_sum += c%10
        c = c//10
    if a <= s_sum <= b:
        sum += i
print(sum)
# Judge status: Wrong Answer
# -*- coding: <encoding name> -*-

a, b, c = map(int, input().split())
print(a * c / 2)
# Judge status: Accepted
# Nとcの定義
N = int(input())
C = input()

# 赤色の個数
red_num = str.count(C, "R")

# 左からred_num個までに含まれる白色の個数
white_num_left = str.count(C[:red_num], "W")

# 最小の操作回数
min_ope = white_num_left

# 最小の操作回数の出力
print(min_ope)
# Judge status: Wrong Answer
A,B=map(int,input().split())
print(abs(int((A-B)/2)) if (A-B)%2==0 else 'IMPOSSIBLE')
# Judge status: Accepted
N = int(input())
dic = {}
for _ in range(N):
  A = input()
  if A in dic:
    del dic[A]
  else:
    dic[A]=0
print(len(dic))
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
from itertools import product

N,M,X=(int(x) for x in input().rstrip('\n').split())
pat = [x for x in product([0,1], repeat=N)]
OK = []
C={}
check=0
for i in range(N):
  C[i]=[int(x) for x in input().rstrip('\n').split()]
for i in pat:
  ans = [0]*M
  for x in range(N):
    add =  [y*i[x] for y in C[x]]
    ans = [y + z for (y,z) in zip(add,ans)]
  if all(y>=X for y in ans[1:]):
    check += 1
    OK.append(ans[0])
if check >0:
  print(min(OK))
else:
  print('-1')
# Judge status: Accepted
def happy(n):
  hap500 = (n // 500) * 1000
  n = n % 500
  hap5 = (n // 5) * 5
  return hap500 + hap5

string = int(input())
print(happy(string))
# Judge status: Accepted
n,a,b = map(int,input().split())
pas,foreignpass = 0,0
s = input()
for i in range (n):
  if pas == a+b:
    print("No")
  elif s[i] == "c":
    print("No")
    continue
  elif s[i] == "a":
    pas += 1
    print("Yes")
  elif s[i] == "b" and foreignpass < b:
    pas += 1
    print("Yes")
    foreignpass += 1
  else:
    print("No")
    continue
# Judge status: Wrong Answer
N = int(input())

for i in range(26):
  if (N-i*4)% 7 == 0:
    print("Yes")
    exit()
print("No")
# Judge status: Wrong Answer
S,T=open(0).read().split()
def main():
    for i in range(1,len(T)+1):
        for j in range(i+1):
            if T[j:(len(T)-i+j)] in S[j:(len(S)-i+j)]:
                return i
                break
if T in S:
    print(0)
else:
    print(main())
# Judge status: Accepted
import numpy as np
import sys
import math

S = input()

mm = [0] * (2019)
mm[0] = 1
a = [0] * (len(S) + 1 ) 
T = 0
ten = 1
ll = len(S)
for i in range(ll):
    if i > 0:
        ten = ( ten * 10 ) % 2019
    a[i+1] =  ( a[i] + (int(S[ll-1-i])*ten ) ) % 2019
    mm[ a[i+1] ] += 1
    #print(s)

ans = 0

for m in mm:
    ans += int( (m * (m-1) ) / 2 )

print(ans)
# Judge status: Accepted
from decimal import *
L = int(input())

a = Decimal(L/3.0)
print(Decimal(a*a*a))
# Judge status: Wrong Answer
n=int(input())
print((n*800)-200)
# Judge status: Wrong Answer
num = int(input("半径を入力してください"))

import math

num = num * 2 * math.pi

print(num)
# Judge status: Accepted
x = int(input())
if x >= 30:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
n, a, b = map(int, input().split())
arr = input()
cnt = 1
abroad = 0

for i in arr:
  
  if i == "c":
    print("No")
  elif cnt <= (a + b):
    if i == "a":
      print("Yes")
      cnt += 1
      
    elif i == "b" and abroad <= b :
      print("Yes")
      cnt += 1
      abroad += 1
    else:
      print("No")
  else:
    print("No")
# Judge status: Accepted
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
res = min(a) + min(b)
for _ in range(M):
    x, y, c = map(int, input().split())
    res = min(res, a[x-1] + b[y-1] - c)
print(res)
# Judge status: Wrong Answer
N,C,K = map(int,input().split())

cnt = 0
ans = 0
lst = [int(input()) for _ in range(N)]
lst = sorted(lst)
next_t = 10**10
for t in lst:
  next_t = min(t+K,next_t)
  if (t > next_t):
    ans += 1
    cnt = 0
    next_t = 10**10
    
  cnt += 1
  if (cnt == C):
    ans += 1
    cnt = 0
    next_t = 10**10
    
if (cnt > 0):
  ans += 1
print(ans)
# Judge status: Accepted
import math
n=int(input())
ans=0
for i in range(2,int(math.sqrt(n)+1)):
    if n%i==0:
        prime=i
        power=0
        while n%i==0:
            n=n//i
            power+=1
        st=1
        while st<=power:
            ans+=1
            power-=st
            st+=1
if n>1:
    ans+=1
print(ans)
# Judge status: Accepted
x,y = map(int,input().split())
mod = 10**9+7
if (x+y)%3!=0:
  print(0)
  exit()
if 2*min(x,y)<max(x,y):
  print(0)
  exit()
n = (2*x-y)//3
m = (2*y-x)//3
#n+mCm
if n==0 or m==0:
  print(1)
  exit()
def ka(x):
  a = 1
  while x!=1:
    a *= x
    x -= 1
    a%= mod
  return a

ans = (ka(n+m)*pow(ka(m),mod-2,mod)%mod)*(pow(ka(n),mod-2,mod))%mod
print(ans)
# Judge status: Wrong Answer
n = input()
cnt = 0
S = input()
for s in S:
    if s == "(":
        cnt += 1
    else:
        cnt -= 1

if cnt > 0:
    print(S + ")" * cnt)
elif cnt < 0:
    print("(" * (-cnt) + S)
else:
    print(S)
# Judge status: Wrong Answer
x = int(input())
cnt = 1
if x % 11 >= 7:
    cnt += 1
cnt += int(x/11) * 2
print(cnt)
# Judge status: Accepted
sx, sy, tx, ty = map(int, input().split())
mx = tx - sx
my = ty - sy
print("U"*my+"R"*mx+"D"*my+"L"*mx+"L"+"U"*(my+1)+"R"*(mx+1)+"DR"+"D"*(my+1)+"L"*(mx+1)+"U")
# Judge status: Accepted
import sys
N,K=map(int, sys.stdin.readline().split())
mod=10**9+7
ans=0
for k in range(K,N+2):
    max_n=(N+(N-k+1))*k/2
    min_n=(k-1)*k/2
    ans+=max_n-min_n+1
print ans%mod
# Judge status: Accepted
n = int(input())
s = input()
x = 0
max = 0
for i in range(n):
  if (s[i] == 'I'):
    x += 1
    if (x > max):
      max = x
  elif (s[i] == 'D'):
    x -= 1
print (max)
# Judge status: Wrong Answer
A,B,C = map(int,input().split())
if A <= C <= B:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
N = int(input())
actions = 0

while N > 6:
  pow = 1
  while True:
    if (9 ** pow > N):
      break
    pow += 1

  if pow - 1 != 0:
    N = N - (9  ** (pow - 1))
    actions += 1

  pow = 1

  while True:
    if (6 ** pow > N):
      break
    pow += 1

  if pow - 1 != 0:
    N = N - (6  ** (pow - 1))
    actions += 1


print(actions + N)
# Judge status: Wrong Answer
a,b,c,x,y = map(int, input().split())
kei = 0
if c > a/2 + b/2:
    kei = a * x + b*y

elif c < a+ b:
    kei += c * (min(x,y)*2)
    if x > y:
        kei += c * ((x - y)*2)
    else:
        kei += c * ((y - x)*2)

elif c < a/2 + b/2:
    kei += c * (min(x,y)*2)
    if x > y:
        kei += a * (x -y)
    else:
        kei += b *(y-x)


print(kei)
# Judge status: Accepted
import sys
n = int(input())

for i in range(n):
    t,x,y = map(int,input().split())
    
    if (x+y) > t or (x+y+t) % 2 == 1:
        print("No")
        sys.exit()
        
print("Yes")
# Judge status: Accepted
def resolve():
    '''
    code here
    '''
    A, B, C = [int(item) for item in input().split()]
    cnt = 0

    while A%2 == 0 and B%2 == 0 and C%2 == 0:
        A, B, C = B//2 + C//2, A//2 + C//2, A//2 + B//2
        cnt += 1

        if A==B==C:
            cnt = -1
            break

    print(cnt)


if __name__ == "__main__":
    resolve()
# Judge status: Accepted
n=int(input())
a=(9**n)%(10**9+7)
b=(8**n)%(10**9+7)
c=(10**n)%(10**9+7)
print((c-2*a+b)%(10**9+7))
# Judge status: Accepted
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    N=int(input())
    results=[]
    for i in range(1,N):
        results.append(sum(map(int,str(i)))+sum(map(int,str(N-i))))
    print(min(results))
    


resolve()
# Judge status: Accepted
from sys import stdin
readline = stdin.buffer.readline
read = stdin.buffer.read
def i_input(): return int(input().rstrip())
def i_map(): return map(int, input().rstrip().split())
def i_list(): return list(i_map())

# import numpy as np
# from numba import jit
# stdin = open('sample.txt')

def main():
    A, B = i_map()
    if (A * B) % 2 == 0:
        print('Even')
    else:
        print('Odd')

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
A,B,H,M=map(int,input().split())
import math

HH=(H*(1/6)*math.pi)%(2*math.pi)
MM=(M*(1/30)*math.pi)%(2*math.pi)

ans=A**2+B**2-2*A*B*math.cos(MM-HH)
print(ans**0.5)
# Judge status: Accepted
N = int(input())
S = input()

table = [0] * (len(S)+1)
wordDict = {}

for i in range(len(S)):
  if S[i] in wordDict :
    wordDict[S[i]] = [wordDict[S[i]][0], i]
  else:
    wordDict[S[i]] = [i+1, i]

for ran in wordDict.values():
  if ran[0] > ran[1]:
    continue
  for i in range(ran[0], ran[1]+1):
    table[i] += 1

maxNum = 0
for i in range(len(S)+1):
  maxNum = max(maxNum, table[i])

print(maxNum)
# Judge status: Accepted
n, m, k = map(int, input().split())
for i in range(n+1):
  for j in range(m+1):
    if i * m + (n - 2 * i) * j == k:
      print("Yes")
      exit()
print("No")
# Judge status: Wrong Answer
import heapq

n, m = map(int, input().split())
a = list(map(lambda x: int(x)*(-1), input().split()))
heapq.heapify(a) 

for i in range(m):
  max_ = heapq.heappop(a)
  d = max_ // 2
  heapq.heappush(a, d)

print(sum(a))

c = 0
for i in range(len(a)):
  c += heapq.heappop(a)
print(c)
# Judge status: Accepted
a, b = map(int, input().split())
c=a*b
if c%2==1:
    print("Odd")
else:
    print("Even")
# Judge status: Wrong Answer
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
B = inintl()[::-1]

if n == 2:
    print(2*B[0])
    exit()

prev = B[0]
ans = prev + 2*B[n-2]

for i in range(1,n-2):
    if B[i] <= prev:
        ans += B[i]
    else:
        ans += prev
    prev = B[i]

print(ans)
# Judge status: Accepted
import itertools

N,M,Q=map(int,input().split())
List = []

for i in range(Q):
  a = list(map(int,input().split()))
  List.append(a)
  
ans = 0

for team in itertools.combinations_with_replacement(range(1,M+1), N):
  cnt = 0
  for i in range(Q):
    a = List[i][0]
    b = List[i][1]
    c = List[i][2]
    d = List[i][3]
    
    if team[b-1] - team[a-1] == c:
      cnt += d
  ans = max(ans ,cnt)  
  
print(ans)
# Judge status: Wrong Answer
import math
import calendar
import fractions
import itertools

n = int(input())
a = sorted(list(map(int, input().split())))
b = set(a)
c = []
for i in b:
    if a.count(i) >= 2:
        c.append(i)
print(c)

if len(c) == 0:
    print(0)
elif len(c) == 1:
    if a.count(c[0]) >= 4:
        print(c[0] ** 2)
else:
    print(c[-1] * c[-2])
# Judge status: Accepted
# ABC102 C - Linear Approximation
N = int(input())
A = list(map(int, input().split()))

bl = []
for i in range(N):
    bl.append(A[i] - (i+1))
bl.sort()
b = bl[N//2]

ans = 0
for i in range(N):
    ans += abs(A[i] - (b + (i+1)))
print(ans)
# Judge status: Accepted
N,A,B = map(int, input().split())
ans = 0
for i in range(1,N+1):
    cnt = 0
    for s in str(i):
        cnt += int(s)
    if A <= cnt <= B:
        ans += i
print(ans)
# Judge status: Wrong Answer
date = int(input().replace('/', ''))
print('Heisei' if date >= 20190430 else 'TBD')
# Judge status: Accepted
X,Y=map(int,input().split())

for i in range(2,10**5):
    if (i*X)%Y!=0:
        print(i*X)
        break
else:
    print(-1)
# Judge status: Accepted
import math
# [int(i) for i in input().split(' ')]
n, = [int(i) for i in input().split(' ')]

ret = 'Yes' if (n % 9 == 0) else 'No'

print(ret)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
if n%2==0:
  print(a[0]+sum(a[1:int(n/2)])*2)
else:
  print(a[0]+sum(a[1:int((n-1)/2)])*2+a[int((n+1)/2-1)])
# Judge status: Accepted
import math
N,D=map(int,input().split())
cord=[list(map(int,input().split())) for i in range(N)]
ans=0
for i in range(N-1):
    for j in range(i+1,N):
        distance=math.sqrt(sum((cord[i][s]-cord[j][s])**2 for s in range(D)))
        if distance-int(distance)<=0.0001:
            ans+=1

print(ans)
# Judge status: Accepted
n,a,b=map(int,input().split())
if (b-a)%2==0:
  ans=(b-a)//2
else:
  ans=min(a-1,n-b)+1+(b-a-1)//2
print(ans)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
d=a%b
e=(d*2)%b
i=3
f=[]
f.append(d)
f.append(e)
while e!=d:
  e=d*i
  e%=b
  i+=1
  f.append(e)

if c in f:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
s=str(input())
num=len(s)-7

ans="NO"

if num==0:
    if s=="keyence":
        ans="YES"

s=s+"!"

s1=""
s2=s[0:num]
s3=s[num:]

for _ in range(8):
    if s1+s3=='keyence!':
        ans="YES"
        break
    s1=s1+s2[0]
    s2=s2[1:]+s3[0]
    s3=s3[1:]

print(ans)
# Judge status: Wrong Answer
D=1000
T=15
S=80


if D/S<=T:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
s = input().rstrip()

ans = 0
cnt_s = cnt_t = 0

for c in s:
    if c == 'S':
        cnt_s += 1
    else:
        cnt_t += 1
    if cnt_t > cnt_s:
        ans += cnt_s
        cnt_s = cnt_t = 0
ans += cnt_s
print(len(s) - ans*2)
# Judge status: Accepted
a,b,c,x,y=map(int,input().split())

aaa=[]

aaa.append(2*c*max([x,y]))
aaa.append(a*x+b*y)

if x > y:
    aaa.append(2*c*y+a*(x-y))
elif x < y:
    aaa.append(2*c*x+b*(y-x))

print(min(aaa))
# Judge status: Accepted
n,a,b = map(int,input().split())
ans = 0
pair = n//(a+b)
ans += pair * a
ans += min(n - (a+b)*pair,a)
print(ans)
# Judge status: Accepted
K = int(input())
S = input()

if(len(S) <= K):
  print(S)
else:
  print(S[:K]+'...')
# Judge status: Wrong Answer
n,k=map(int,input().split())
h=[]
for i in range(n):
  h_=int(input())
  h.append(h_)
  
h.sort()

ans=float('inf')
for i in range(1,k+1):
  ans=min(ans,h[n-i]-h[n-i-k+1])
  
print(ans)
# Judge status: Accepted
X,Y = map(int,input().split())

count = 0
Acount = X
while (Acount <= Y):
    Acount *= 2
    count += 1

print(count)
# Judge status: Accepted
n = int(input().strip())
a = list(map(int, input().split()))
s = [a[0]]
for i in range(0, (n - 1)):
    s.append(s[i] + a[i + 1])
mi = float('inf')
su = sum(a)
for i in range(n - 1):
    rep = abs(su - 2 * s[i])
    if rep < mi:
        mi = rep
print(mi)
# Judge status: Accepted
h, n = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)
if h - sum(a) <= 0:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a, b = map(int, input().split())
list_S = list(input())
ans = "No"
if list_S[:a].count("-") == 0 and list_S[a+1:].count("-") == 0 and list_S[a] == "-":
    ans = "Yes"

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

if (n == 1) or (a > b):
    print(1 if a == b else 0)
else:
    print((n - 2) * (b - a) + 1)
# Judge status: Accepted
s = input()

if s == 'AAA' or s == 'BBB' :
    print('No')
else :
    print('Yes')
# Judge status: Accepted
s=input()
S,E,W,N="S" in s,"E" in s,"W" in s,"N" in s
if S^N or E^W:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
A, B = map(int, input().split())

if (A > 8 or B > 8):
  print(":(")

else:
  print("Yay!")
# Judge status: Accepted
X, N = list(map(int, input().split()))

if N == 0:
  print(X)
  exit()

P = list(map(int, input().split()))
up_min = 0
low_min = 0

arr = [0] * 102
for i in P:
  arr[i] = 1
lower = arr[:X]
lower.reverse()
upper = arr[X:]
for i, num in enumerate(lower):
  if num == 0:
    low_min = len(lower) - 1 - i
    break
for i, num in enumerate(upper):
  if num == 0:
    up_min = len(lower) + i
    break

if abs(up_min - X) >= abs(X - low_min):
  print(low_min)
else:
  print(up_min)
# Judge status: Accepted
n=int(input())
if n%10==3:
  print('bon')
elif n%10==0 or n%10==1 or n%10==6 or n%10==8:
  print('pon')
else:
  print('hon')
# Judge status: Accepted
# C - Next Prime
N = 110000
p = [0]*N
x = int(input())

for i in range(2,N):
    if p[i]:
        continue
    if i>=x:
        print(i)
        break
    tmp = i
    while tmp<N:
        p[tmp] = 1
        tmp += i
# Judge status: Wrong Answer
import numpy as np
N, M = map(int, input().split())

A = np.zeros((N,M))
for i in range(N):
    a = list(map(int, input().split()))
    a = a[1:]
    A[i, 0:len(a)] = a

for i in range(N):
    a = A[i]
    a = a[(a != 0) & (a < M)]
    if i == 0:
        s = set(list(a))
    else:
        _s = set(list(a))
        s &= _s

print(len(s))
# Judge status: Accepted
n,k = map(int, input().split())
X = list(map(int, input().split()))
ans = []


for i in range(n-k+1):
  l = X[i]
  r = X[i+k-1]
  
  ans.append(abs(r-l)+min(abs(l), abs(r)))
  
print(min(ans))
# Judge status: Accepted
N,A,B,C,D = map(int,input().split())
S = ['#']+list(input())
CanReach = True
CanChange = False
for i in range(A,C):
    if S[i] == '#' and S[i+1] == '#':
        CanReach = False
for i in range(B,D):
    if S[i] == '#' and S[i+1] == '#':
        CanReach = False
if C < D:
    CanChange = True
else:
    for i in range(B,D+1):
        if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
            CanChange = True
if CanReach and CanChange:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n,m=map(int, input().split()) 
h = list(map(int, input().split()))
ab=[list(map(int,list(input().split()))) for i in range(m)] 


ans = [1]*n
for i in ab:
    if h[i[0]-1] <= h[i[1]-1]:
        ans[i[0]-1] = 0
    if h[i[0]-1] >= h[i[1]-1]:
        ans[i[1]-1] = 0

print(ans.count(1))
# Judge status: Wrong Answer
def solve():
    n = int(input())
    p = 1
    for i in range(1,n+1):
        p *= i
    p = p % 1000000009
    print(p)
    return 0

if __name__ == "__main__":
    solve()
# Judge status: Wrong Answer
a = input()
flag = False

for i in range(0, 3):
    if a[i] == a[i+1]:
        print("Bad")
        flag = True

if not flag:
    print("Good")
# Judge status: Accepted
w,a,b = map(int,input().split())

if a+w < b:
    print(b-(a+w))
elif b+w < a:
    print(a-(b+w))
else:
    print(0)
# Judge status: Accepted
n, m  = map(int, input().split())

if m % 2 ==0:
    for i in range(m//2):
        print(1+i, m-i)
        print(m+1+i, 2*m+1-i)
else:
    for i in range((m//2)+1):
        print(m+1+i, 2*m+1-i)
    for i in range(m//2):
        print(1+i, m-i)
# Judge status: Wrong Answer
N = int(input())
good = N
i = 0
A = [int(x) for x in input().split()]
A.sort(reverse=True)
for i in range(N):
    if A[i]==A[i-1]:
        good -= 1
        continue
    for j in range(i+1,N):
        if A[i]%A[j]==0:
            good -= 1
            break
print(good)
# Judge status: Accepted
from collections import defaultdict

n = int(input())
a = list(map(int, input().split()))
cnt = defaultdict(int)
data = []
for i in range(n):
    cnt[a[i]] += 1

if sum(v >= 2 for v in cnt.values()) < 2:
    print(0)
elif cnt[max(cnt.keys())] >= 4:
    print(max(cnt.keys()) ** 2)

else:
    for k, v in cnt.items():
        if v >= 2:
            data.append(k)
    data.sort(reverse = True)
    print(data[0] * data[1])
# Judge status: Accepted
import heapq

N,M = map(int, input().split())
List1=list(map(int,input().split()))
List=[]

for i in range(N):
  a = List1[i]
  List.append(-a)

heapq.heapify(List)

for i in range(M):
  a = (-heapq.heappop(List)) // 2
  heapq.heappush(List, -a)
  
print(int(-sum(List)))
# Judge status: Accepted
A,B,C = map(int,input().split())
L = [A,B,C]
S = sorted(L)
print(S[2]*10+S[1]+S[0])
# Judge status: Wrong Answer
N = int(input())
C = input()
R = C.count("R")
C = C[:len(C)//2]
W2 = C.count("W")
print(min(R, N - R) if W2*2 > N else min(min(R, N - R),W2))
# Judge status: Accepted
K=int(input())
t=0
for i in range(K+2):
  t=(10*t+7)%K
  if t%K==0:
    ans=i+1
    break
else:
  ans=-1
print(ans)
# Judge status: Accepted
w=input()
if all([w.count(i)%2==0 for i in set(w)]):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n = int(input())
ls = []
for i in range(n):
    x,l = map(int,input().split())
    ls.append([x-l,l+x])
    
ls = sorted(ls, key=lambda item: item[1])
ans = n

for i in range(1,n):
    if ls[i][0] < ls[i-1][1]:
      ls[i][1] = ls[i-1][1]
      ans -=1
        
print(ans)
# Judge status: Accepted
n = list(input())
k = int(input())
for i in range(min(len(n),k)):
    if n[i] != '1':
        print(n[i])
        exit()
print(1)
# Judge status: Accepted
from collections import Counter

N = int(input())
S = list(input())

cnt = Counter(S)

ans = cnt['R'] * cnt['G'] * cnt['B']

for i in range(N):
  for j in range(i+1, N):
    k = j + j - i
    if k < N :
      if (S[i] == S[j]) or (S[j] == S[k]) or (S[k] == S[i]) :
        continue
      ans -= 1

print(ans)
# Judge status: Accepted
from collections import Counter
w = input()
w = list(w)
s = Counter(w)
n = 0
for i in s.values():
    if i % 2 == 0:
        n += int(i/2)
        
if len(w)/2 == n:
    print("Yes")
    
else:
    print("No")
# Judge status: Wrong Answer
n, k = map(int, input().split())
s = input()
h = s[k-1]
print(s.replace(s[k-1], h.lower()))
# Judge status: Accepted
import sys
input = sys.stdin.buffer.readline
import numpy as np

D = int(input())
c = np.array(input().split(), dtype=np.int32)
s = np.array([input().split() for _ in range(D)], dtype=np.int32)
last = np.zeros(26, dtype=np.int32)
# print(s)
# print(s.shape)

ans = []
point = 0
for i in range(D):
    down = (i+1-last)*c
    loss = down * 5 + s[i,:]
    idx = np.argmax(loss)
    ans.append(idx+1)
    point += s[i, idx] - down.sum()
    last[idx] = i+1
    # print(loss)

for i in range(D):
    print(ans[i])
# Judge status: Accepted
input()
a=t=0
for c in input():
  t+=(c>'D')*2-1
  a=max(a,t)
print(a)
# Judge status: Wrong Answer
A,B = map(int,input().split())

k = (A + B) / 2

answer = 0
if A - k >= 0 and -B + k <=0 :
	answer = 1
    
elif -A + k <=0 and B - k >= 0 :
	answer = 1 
    
if answer == 1 and (A + B) % 2 == 0  :
	print(k)
else :
	print("IMPOSSIBLE")
# Judge status: Accepted
print(['consonant','vowel'][input() in ['a','i','u','e','o']])
# Judge status: Accepted
D = int(input())
print('Christmas' + " Eve"*(25-D))
# Judge status: Wrong Answer
a,b,c,d=list(map(int,input().split()))

if b>0 and d>0:

    one=b
    two=c
elif b>=0 and d>=0:

    one=a
    two=c
else:
    if b>0:

        one=a
        two=d
    else:

        one=b
        two=c

print(one*two)
# Judge status: Accepted
a,b=map(int,input().split())
ans=a+b
if ans>=24:
    print(ans%24)
else:
    print(ans)