peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
inp = input()
if (inp == "ABC") :
  print("ARC")
else :
  print("ABC")
# Judge status: Accepted
n = int(input())
d = {}
for i in range(n):
  a = int(input())
  if a in d:
    if d[a] <= 0:
      d[a] += 1
    else:
      d[a] -=1
  else:
    d[a] = 1
cnt = 0
for i in d.values():
  if i > 0:
    cnt += 1
print(cnt)
# Judge status: Accepted
N = int(input())
apple = sorted(list(map(int, input().split())))
c = (apple[0] + apple[1]) / 2
for i in range(2, N):
    c = (c + apple[i]) / 2
print(c)
# Judge status: Wrong Answer
n, m = [int(s) for s in input().split()]
a = [0 for _ in range(n)]
for i in range(m):
  p, res = input().split()
  p = int(p) - 1
  if a[p]%2==0:
  	a[p] += 2 if res=='WA' else 1
  
print(sum([tmp%2 for tmp in a]), sum([tmp//2 for tmp in a]))
# Judge status: Wrong Answer
S=input()
N=len(S)
s=1
for i in range(1,N):
    if S[N-1-i]==S[N-1]:
        s+=1
    else:
        break
if S[N-1]=='T':
    print(0)
else:
    print(2*s)
# Judge status: Accepted
a,b,c = map(int, input().split())
if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
  print(0)
else:
  for i in range(10**6):
    temp1 = a
    temp2 = b
    temp3 = c
    a = int((temp2+temp3)/2)
    b = int((temp1+temp3)/2)
    c = int((temp1+temp2)/2)
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
      break
  if i == 10**6 - 1:
    print(-1)
  else:
    print(i+1)
# Judge status: Accepted
import numpy as np
from scipy.sparse.csgraph import shortest_path
from scipy.sparse import csr_matrix

n, x, y = map(int, input().split())

v = [x-1]
u = [y-1]
for i in range(n-1):
    v.append(i)
    u.append(i+1)

csr = csr_matrix(([1]*n, (v, u)), shape=(n, n))
result = shortest_path(csr, method='D', directed=False).astype(int)
ans = np.bincount(result.ravel(), minlength=n) // 2
print(*ans[1:], sep='\n')
# Judge status: Accepted
N,K=map(int,input().split())
A=[]

for _ in range(K):
    d=int(input())
    A.append(list(map(int,input().split()))) 
print(N-len(set(sum(A,[]))))
# Judge status: Accepted
n,m=map(int,input().split())
a=[list(map(int,input().split())) for i in range(m)]

l=10**(n-1)
if n==1:
    l=0
for i in range(l,10**n):
    s=str(i)
    for x,y in a:
        if s[x-1]!=str(y):
            break
    else:
        print(i)
        exit()
print(-1)
# Judge status: Accepted
from heapq import *
n, h = map(int,input().split())
ab = [list(map(int,input().split())) for i in range(n)]

a = []
b = []
for i, j in ab:
    a.append(i)
    b.append(-j)
heapify(b)
max_a = max(a)

cnt = 0
while h > 0:
    temp = heappop(b) * (-1) if b else 0
    if temp > max_a:
        h -= temp
        cnt += 1
    else:
        temp = (h + max_a - 1)/max_a
        h -= max_a * int(temp)
        cnt += int(temp)

print(cnt)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))  # [1, 2, 3, 4] になる

len2 = len(set(A))
if N == len2:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
h = int(input())
w = int(input())
m = int(input())
total = 0
if h < w:
  h,w = w,h
for i in range(w):
  total += h
  if total >= m:
    print(i+1)
    exit()
# Judge status: Accepted
n, k = map(int, input().split())
h = [int(_) for _ in input().split()]
dp = [1000000000] * n
dp[0] = 0
for i in range(n):
    for j in range(1,k+1):
        if i+j < n:
            dp[i+j] = min(dp[i+j], dp[i] + abs(h[i] - h[i+j]))
print(dp[n-1])
# Judge status: Accepted
import sys
input = sys.stdin.readline
from collections import Counter


def read():
    S = input().strip()
    return S,


def solve(S):
    C = Counter(S) + Counter("abc")
    V = list(sorted(C.values()))
    if V[-1] - V[0] <= 1:
        return "YES"
    else:
        return "NO"


if __name__ == '__main__':
    inputs = read()
    print(solve(*inputs))
# Judge status: Accepted
N,K = map(int,input().split())
A = list(map(int, input().split()))

X = list(range(1,N+1))
lo = 1
hi = max(A)

while hi-lo>=2:
    mid = (lo+hi)//2
    
    temp = list(map(lambda x:  x//mid - (x%mid==0) ,A))
    if sum(temp) <= K:
        hi = mid
    else:
        lo = mid

temp = list(map(lambda x:  x//lo - (x%lo==0) ,A))

if sum(temp) <= K:
    print(lo)
else:
    print(hi)
# Judge status: Accepted
n=input()
k = int(n) % 111
if k==0:
    print(n)
else:
    if n[0]>n[1] or (n[0]==n[1] and n[1]>n[2]):
        print(n[0]*3)
    else:
        print((str(int(n[0])+1))*3)
# Judge status: Wrong Answer
A,B=map(int,input().split())
if 1<A<=9 and 1<B<=9:
  print(A*B)
else:
  print(-1)
# Judge status: Accepted
import sys
from collections import Counter
input = sys.stdin.readline

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

count = Counter(A)
sm = {}
sm2 = {}
for key, value in count.items():
    sm[key] = value*(value-1)//2
    sm2[key] = (value-1)*(value-2)//2
total = sum(sm.values())

for num in A:
    print(total - sm[num] + sm2[num])
# Judge status: Accepted
a, b, k = map(int, input().split())

t = []

for i in range(k):
    if i+a <= b:
        t.append(i+a)

for i in range(k):
    if b-i >= a:
        t.append(b-i)

y = list(set(t))

for x in sorted(y):
    print(x)
# Judge status: Wrong Answer
N=int(input())
for i in range(int(N**0.5)+1,1,-1):
  if N%i==0:
    print(N/i+i-2)
# Judge status: Accepted
n = int(input())
d = sorted(list(map(int,input().split())))
print(d[n//2] - d[n//2-1])
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
n, h = map(int, input().split())
a, b = [0]*n, [0]*n
for i in range(n):
    a[i], b[i] = map(int, input().split())
a_max = max(a)
b_thr = []
for i in b:
    if i > a_max:
        b_thr.append(i)
b.sort(reverse=True)
ans = 0
for i in b_thr:
    if h > 0:
        h -= i
        ans += 1
    else:
        print(ans)
        exit()
if h % a_max == 0:
    ans += h // a_max
else:
    ans += h // a_max + 1
print(ans)
# Judge status: Accepted
s=input()
i=s.split(" ")
print(i[0][0]+i[1][0]+i[2][0])
# Judge status: Wrong Answer
a,b,c,d = map(int, input().split())
 
if b < c or d < a:
  print("0")
elif a <= c:
  if b <= d:
    print(b-c)
  else:
    print(d-c)
else:
  if c <= a:
    print(d-a)
  else:
    print(d-c)
# Judge status: Accepted
A = input()
B = input()
C = input()

S = dict()
S['a'] = list(A[::-1])
S['b'] = list(B[::-1])
S['c'] = list(C[::-1])

next_p = 'a'
while S[next_p]:
    next_p = S[next_p].pop()
print(next_p.upper())
# Judge status: Accepted
import numpy as np

n = int(input())
a = np.array(list(map(int, input().split())))
MOD = 10 ** 9 + 7

ans = 0

for i in range(60):
    one = np.count_nonzero(a >> i & 1)
    zero = n - one
    ans += one * zero * 2 ** i
    ans %= MOD

print(ans)
# Judge status: Accepted
#template
def inputlist(): return [int(j) for j in input().split()]
#template
#issueから始める
A,B,C,K = inputlist()
if abs(B-A) >= 10**18:
    print("Unfair")
    exit()
ans = A-B
if K % 2 == 1:
    ans *= -1
print(ans)
# Judge status: Wrong Answer
S = list(input())
if S[2] == S[3] and S[4] == S[5]:
    print('yes')
else:
    print('no')
# Judge status: Accepted
N, M = map(int, input().split())
stdt = []
chpt = []
for _ in range(N):
    a, b = map(int, input().split())
    stdt.append((a, b))
for _ in range(M):
    a, b = map(int, input().split())
    chpt.append((a, b))

for s in stdt:
    a, b, = s[0], s[1]
    m = 100000000000000
    i = 0
    for j in range(M):
        d = abs(a - chpt[j][0]) + abs(b - chpt[j][1])
        if m > d:
            m = d
            i = j + 1
    print(i)
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-

r, g, b = map(int, list(input().split()))

num = r * 100 + g * 10 + b
print(num)
if num % 4:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
n,m  = map(int, input().split())
ten = list(map(int, input().split()))
arr = [list(map(int,input().split())) for i in range(m)]
hikui = []
for i in arr:
    if ten[i[0]-1]<ten[i[1]-1]:
        hikui.append(i[0])
    elif ten[i[1]-1]<ten[i[0]-1]:
        hikui.append(i[1])
    else:
        hikui.append(i[0])
        hikui.append(i[1])
ans = n-len(set(hikui))

print(ans)
# Judge status: Accepted
s,t=input().split()
x,y=map(int,input().split())
if s==input():
    print(x-1,y)
else:
    print(x,y-1)
# Judge status: Wrong Answer
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
z = [list(map(int, input().split())) for _ in range(M)]

C = min(A, B)
mem = []
for i in range(C):
    mem.append(a[i] + b[i])

for x, y, c in z:
    mem.append(a[x - 1] + b[y - 1] - c)

print(min(mem))
# Judge status: Accepted
n = int(input())
S = input()
ans = 0
for i in range(0,n-1):
  A = set(S[0:i+1])
  B = set(S[i+1:n])
  ans = max(ans,len(list(A&B)))
  
print(ans)
# Judge status: Accepted
n=int(input())
l=[n]

i=1
while len(set(l))==i:
    if n%2==0:
        n=n/2
    else:
        n=3*n+1
    l.append(n)
    i+=1
print(i)
# Judge status: Accepted
t = input()
ans = t.replace('?', 'D')
print(ans)
# Judge status: Accepted
N = int(input())

dp = [[] for _ in range(N)]
dp[0].append('a')

for i in range(1, N):
    for strings in dp[i-1]:
        j = 97
        while j <= ord(max(strings))+1:
            nextstr = strings
            nextstr += chr(j)
            dp[i].append(nextstr)
            j += 1

dp[N-1].sort()

for strings in dp[N-1]:
    print(strings)
# Judge status: Accepted
A, B, X = map(int, input().split())

if A > X:
    print('NO')
    exit()

if A + B >= X:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
from sys import exit

N = int(input())
A = list(int(x) for x in input().split())

break_count = 0

for key, a in enumerate(A, 1):
    if not a == key - break_count:
        break_count += 1

if break_count == N:
    print(-1)

else:
    print(break_count)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = sum(B)
for i in range(1, N):
    if A[i] - A[i - 1] == 1:
        ans += C[A[i - 1] - 1]
print(ans)
# Judge status: Accepted
import math

n = int(input())
xs = []
ys = []
for i in range(n):
    x, y = map(int, input().split())
    xs.append(x)
    ys.append(y)

sum_dist = 0
for i in range(n-1):
    for j in range(i+1, n):
        sum_dist += math.sqrt((xs[i]-xs[j]) ** 2 + (ys[i]-ys[j]) ** 2)

print(sum_dist * 2 / n)
# Judge status: Accepted
N,A,B = map(int,input().split())
S = input()
countA = 0
countB = 0

for i in range(len(S)):
  if S[i] == 'a' and countA + countB < A + B:
    countA += 1
    print('Yes')
  elif S[i] == 'b' and countA + countB < A + B and countB < B:
    countB += 1
    print('Yes')
  else:
    print('No')
# Judge status: Accepted
import sys,math,collections,itertools
input = sys.stdin.readline

N=int(input())
p=list(map(int,input().split()))
pa = []
cnt = 0
for i in range(N):
    if i+1 == p[i]:
        cnt +=1
    elif i+1 != p[i] and cnt>0:
        pa.append(cnt)
        cnt =0
if cnt >0:
    pa.append(cnt)
cnt = 0
for cn in pa:
    cnt += cn//2+cn%2
print(cnt)
# Judge status: Accepted
n = int(input())
pt = 0
px, py = 0, 0
f = True
for i in range(n):
    t, x, y = map(int, input().split())
    dis = abs(px-x) + abs(py-y)
    dt = t - pt
    #print("dis{0} dt = {1}".format(dis, dt))
    if dt >= dis and abs(dis - dt) % 2 == 0:
        pass
    else:
        f = False
    pt, px, py = t, x, y
print("Yes" if f else "No")
# Judge status: Accepted
N, K = map(int, input().split())
for i in range(10000):
	if N//(K**i) >= K:
	  	continue
	else:
  		print(i+1)
  		exit(0)
# Judge status: Accepted
N = int(input())
count = int((N-1)/1000) + 1
print(1000*count-N)
# Judge status: Accepted
from fractions import *
n,*a=map(int,open(0).read().split())
b=1
for i in a:b*=i//gcd(b,i)
print(sum(b//i for i in a)%(10**9+7))
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
from collections import defaultdict

N = int(input())
d = defaultdict(int)
for _ in range(N):
    s = list(input().rstrip("\r\n"))
    s.sort()
    if d["".join(s)] == 0:
        d["".join(s)] += 1
    else:
        d["".join(s)] += d["".join(s)]
ans = 0
for k in d:
    ans += d[k]-1
print(ans)
# Judge status: Accepted
N = int(input())
As = list(map(int, input().split()))

def calcgcd(a, b):
  if a > b:
    a, b = b, a
  while a > 0:
    a, b = b%a, a
  return b
def calclcm(a, b):
  return a*b//calcgcd(a, b)

r = 1
a = As[0]
for i in range(1, N):
  b = As[i]
  d = calcgcd(a, b)
  r = (r*(b//d)+(a//d))%1000000007
  a = a*b//d
print(r)
# Judge status: Accepted
N=int(input())
a=[list(map(int,input().split())) for _ in range(N)]
dp=[[0,0] for _ in range(N+1)]
f=True
for i in range(N):
  t=a[i][0]-dp[i][1]
  x=a[i][1]
  y=a[i][2]
  if t>=x+y-dp[i][0] and t%2==(x+y+dp[i][1])%2:
    dp[i+1][0]=x+y
    dp[i+1][1]=a[i][0]
  else:
    f=False
    break
if f:print("Yes")
else:print("No")
# Judge status: Accepted
a=input().split()
b=list(set(a))
print(len(b))
# Judge status: Wrong Answer
x = int(input())
nums = []
i = 0
while i ** 5 <= 10 ** 10:
    nums.append(i ** 5)
    i += 1

for i in range(len(nums)):
    a5 = nums[i]
    for j in range(len(nums)):
        b5 = nums[j]
        if x == a5 - b5:
            print(i, j)
            exit()
        if x == a5 + b5:
            print(i, -j)
            exit()
# Judge status: Accepted
from collections import Counter

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

c = Counter(a)
cnt = 0
for key,value in Counter(a).items():
    if key < value:
        cnt += value - key
    if key > value:
        cnt += value
print(cnt)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

cnt = 0
b = []
c = []
for i in range(n):
  if i == 0:
    b.append(a[i])
  elif i % 2 == 0:
    b.append(a[i])
  elif i % 2 == 1:
    c.append(a[i])

if n % 2:
  ans = b[::-1] + c
else:
  ans = c[::-1] + b
print(*ans)
# Judge status: Accepted
def solve():
    S = input()
    q = int(input())
    flg = 0
    li = ["", ""]
    for _ in range(q):
        Q = input().split()
        if Q[0] == "1":
            flg = 1 - flg
        else:
            li[(int(Q[1]) - 1 + flg) % 2] += Q[2]
    if flg:
        S = S[::-1]
    print(li[flg][::-1] + S + li[1 - flg])
solve()
# Judge status: Accepted
n = input()

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

if n[-1] in bon:
    print('bon')
elif n[-1] in hon:
    print('hon')
elif n[-1] in pon:
    print('pon')
# Judge status: Wrong Answer
n=int(input())
d=list(map(int,input().split()))
ans=1
mod=998244353
pre=0
c=[0]*n
for dd in d:
  c[dd]+=1
max_i=0
for cc in c:
  if cc>0:
    max_i+=1
for i in range(max_i):
  if i==0:
    if c[i]==1:
      pre=c[i]
      continue
    else:
      ans=0
      break
  if c[i]!=0:
    ans*=pow(pre,c[i],mod)
    pre=c[i]
    ans%=mod
  elif c[i]==0:
    ans=0
    break
print(ans%mod)
# Judge status: Wrong Answer
s = input()
# ans = 0
# while '01' in s or '10' in s:
#     # print('yes')
#     if '01' in s:
#         s = s.replace('01', '', 1)
#         ans += 2
#     if '10' in s:
#         s = s.replace('10', '', 1)
#         ans += 2
#     # print(s, ans)

# # print(ans)

ans = min(s.count('0'), s.count('1'))
print(ans)
# Judge status: Accepted
A, B = list(map(int, input().split()))
for x in range(1001):
	if (x * 8) // 100 == A and x // 10 == B:
		print(x)
		break
else:
	print(-1)
# Judge status: Accepted
N = int(input())
D = list(map(int, input().split()))
D.sort()

print(D[N//2] - D[N//2-1])
# Judge status: Accepted
import math

r = int(input())

print(2*r*math.pi)
# Judge status: Accepted
n, a, b = map(int, input().split())
if (n == 1 and a == b):
  ans = 1
elif (n == 1):
  ans = 0
elif a > b:
  ans = 0
else:
  ans = (b - a) * (n - 2) + 1
print(ans)
# Judge status: Wrong Answer
s = sorted(list(set(list(input()))))
i = 0
while i < 25 and chr(i+97)==s[i]:
    i += 1
if i<=25:
    print(chr(i+97))
else:
    print("None")
# Judge status: Accepted
import bisect

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

l.sort()
#print(l)
ans = 0
for i in range(n-1):
	a = l[i]
	for j in range(i+2,n):
		b = l[j]
		c = bisect.bisect_left(l,b-a+1)
		if j - c > 0:
			if i >= c:
				ans += j-i-1
			else:
				ans += j-c
		#print(i,j,c,ans)

print(ans)
# Judge status: Accepted
a, b = map(int, input().split())
ans=[int(x) for x in range(b-a+1,b+a)]
print(*ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
t = sum(b)-sum(a)
res=0
for i in range(n):
    res += (b[i]-a[i]+1)//2
if res > t:
  print('No')
else:
  print('Yes')
# Judge status: Accepted
a, b, c, d = map(int, input().split())

while c > 0 and a > 0:
    c -= b
    a -= d

print('Yes' if c <= 0 else 'No')
# Judge status: Wrong Answer
s = str(input())
strlist = list(s)
strlist[3] = '8'
s = str(strlist)
print(s)
# Judge status: Accepted
a,b = map(int, input().split())

before = a - 1
now = 0
if a <= b:
  now = 1
  
print(before + now)
# Judge status: Accepted
for i,s in enumerate(input(),start=1):
  if i%2==0:
    if s=='R':
      print('No')
      exit(0)
  else:
    if s=='L':
      print('No')
      exit(0)
print('Yes')
# Judge status: Accepted
A, B, C = map(int, input().split())

space = A - B

print(max(0, C - space))
# Judge status: Wrong Answer
FH, FM, TH, TM, K = map(int, input().split())
M = (TH-FH)*60+(TM-FM)
ans = M // K-(1 if M%K == 0 else 0)
print(ans*K)
# Judge status: Accepted
n=int(input())
lists=[]
for i in range(n):
  a=int(input())
  lists.append(a)
#Nこの連続した数の最大公約数、最小公倍数を求めるアルゴリズム
import math
import fractions

#最小公倍数
def union_lcm(lists):
    if len(lists)==1:
        return lists[0]
    elif len(lists)>1:
        num=lists[0]
        for i in range(1,len(lists)):
            num=num*lists[i]//fractions.gcd(num,lists[i])
        return num
P=union_lcm(lists)
print(P)
# Judge status: Accepted
n,m=map(int,input().split())
for i in range(m):
 print(i+1,2*m-i+(n%2==0 and 2*(m-i)-1>=n//2))
# Judge status: Wrong Answer
n=int(input())
x=""
while n!=0:
  x=str(n%2)+x
  n=-(n//2)
print(0 if n==0 else x)
# Judge status: Accepted
# Problem A - A+...+B Problem

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

# corner case
if A>B:
    print(0)
elif N==1 and A!=B:
    print(0)
elif N==1 and A==B:
    print(1)
else:
    ans = (N-2)*(B-A) + 1
    print(ans)
# Judge status: Accepted
L = int(input())

ans = (L/3)**3
print(ans)
# Judge status: Wrong Answer
N,Y = map(int,input().split())

"""
a #10,000円
b #5,000円
c #1,000円
"""
ans = []

for a in range(N):
    for b in range(N):
        c = N - a - b
        if 10000*a + 5000*b + 1000*(N-a-b) == Y:
            print(a,b,N-a-b)
            exit()
print(-1,-1,-1)
# Judge status: Accepted
n,k=map(int,input().split())
a=[0]+[int(j) for j in input().split()]
l=[-1]*(n+1)
ll=[]
i=1
idx=0
while True:
    if l[i]==-1:
        l[i]=idx
    else:
        ll.append(i)
        break
    ll.append(i)
    i=a[i]
    idx+=1

p=ll[-1]
nl=ll[l[p]:-1]
ml=ll[:l[p]]
n,m=len(nl),len(ml)
if k<m:
    print(ml[k])
elif nl==[]:
    print(p)
    exit()
else:
    print(nl[(k-m)%n])
# Judge status: Accepted
w,a,b=map(int,input().split())
c=min(a,b)
d=max(a,b)
if c+w<d:
    print(d-c-w)
else:
    print(0)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
ans='APPROVED'
for i in range(n):
  if a[i]%2==0:
    if a[i]%3!=0 and a[i]%5!=0:
      ans='DENIED'
      break
print(ans)
# Judge status: Accepted
n = input()
num = len(n) // 2
ans = 0
for i in range(num):
  if n[i] != n[len(n)-1-i]:
    ans += 1
print(ans)
# Judge status: Accepted
x=int(input())
t=x//11
if x-t*11==0:
  print(t*2)
elif x-t*11<=6:
  print(t*2+1)
else:
  print(t*2+2)
# Judge status: Accepted
if int(input()):
  print(0)
else:
  print(1)
# Judge status: Accepted
import collections
import math


def main():
    n, k, s = map(int, input().split())
    if s > 1:
        print(" ".join([str(s)] * k + [str(s - 1)] * (n - k)))
    else:
        print(" ".join([str(s)] * k + [str(s + 1)] * (n - k)))


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
S = input()
if(S[2] == S[3] and S[4] == S[5]):
    print('yes')
else:
    print('no')
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
B=[0]*(N+1)
C=0
for i in A:
    B[i-1]+=1
for i in B:
    if i>=2:
        C+=i*(i-1)//2
for i in A:
    print(C-B[i-1]+1)
# Judge status: Accepted
a, b, c = map(int, open(0).read().split())

if a == b and b == c:
    print("No")
elif a != b and b != c and c != a:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
def main():
    import sys
    X=int(sys.stdin.readline())
    i=1
    while True:
        if 360*i%X==0:
            print(360*i//X)
            break
        i+=1
main()
# Judge status: Wrong Answer
x = int(input())
if x % 7 == 0 or x % 5 == 0 or x % 3 == 0:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
a, b, x = map(int, input().split())
m1 = a % x
m2 = b % x
if a == b:
  if a % x == 0:
    print(1)
  else:
    print(0)
  exit()
if m1 != 0:
  a = (a//x)*x + x
if m2 != 0:
  b = (b//x)*x

print((b//x-a//x)+1)
# Judge status: Accepted
s=input()

if "RRR" in s:
  print("3")
elif "RR" in s:
  print("2")
elif "R" in s:
  print("1")
else:
  print("0")
# Judge status: Accepted
n=int(input())
a=[list(map(int,input().split())) for i in range(n-1)]
def t(x,k):
    if a[k][1]<=x:
        return (x+a[k][2]-1)//a[k][2]*a[k][2]+a[k][0]
    return a[k][1]+a[k][0]
for i in range(n-1):
    p=t(0,i)
    for j in range(i+1,n-1):
        p=t(p,j)
    print(p)
print(0)
# Judge status: Accepted
N,x = map(int,input().split())
a = list(map(int,input().split()))
cnt = 0
for i in range(N-1):
    if(a[i] > x):
        cnt += a[i] - x
        a[i] = x
    
    if(a[i] + a[i+1] > x):
        cnt += a[i] + a[i+1] - x
        a[i+1] = x - a[i]
    
print(cnt)
# Judge status: Accepted
N,K = map(int,input().split())
num = [0]*(10**5+1)
for i in range(N):
    a,b = map(int,input().split())
    num[a] += b
for i in range(1,10**5+1):
    if K <= num[i]:
        print(i)
        exit()
    K -= num[i]
# Judge status: Accepted
a = int(input())
b = int(input())
c = int(input())
x = int(input())
count = 0
for i in range(a + 1):
	for j in range(b + 1):
		for k in range(c + 1):
			if 500*i + 100*j + 50*k == x:
				count += 1
print(count)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

a.sort()

large = max(a)
a.remove(large)
min_list = [0, large/2]
for i in a:
    if abs(i - large/2) < min_list[1]:
        min_list = [i, abs(i - large/2)]

print(large, min_list[0])
# Judge status: Accepted
n=int(input())
l = []
for _ in range(n):
    l.append(input())
if len(l)>len(set(l)):
  print("No")
  exit()
i=0
while i<n-1:
  if l[i][-1]!=l[i+1][0]:
    print("No")
    exit()
  else:
    i=i+1
print("Yes")
# Judge status: Accepted
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

x, y, z = LI()
ans = (x - z) // (y+z)
print(ans)
# Judge status: Accepted
from random import randint

D = int(input())
C = [int(i) for i in input().split()]
scores = [[int(i) for i in input().split()] for j in range(D)]
print("\n".join(map(str, [randint(1,26) for i in range(D)])))
# Judge status: Wrong Answer
n, m = map(int, input().split())
x = list(map(int, input().split()))
x.sort()

res = []
for i in range(m-1):
  res.append(x[i+1]-x[i])
res.sort()

ans = sum(res[:len(res)-n+1])
print(ans)
# Judge status: Accepted
K=int(input())

import math
ans=0
for i in range(1,K+1):
    for j in range(1,K+1):
        gcd=math.gcd(i,j)
        for k in range(1,K+1):
            ans+=math.gcd(gcd,k)
print(ans)
# Judge status: Accepted
S = input()

l = []

for s in S:
    if s in l:
        print('no')
        exit()
    l.append(s)
print('yes')
# Judge status: Accepted
#! /usr/bin/env python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N, *A = map(int, read().split())

A = sorted(A)[::-1]
A = A[1:-N:2]

print(sum(A))