Harryxun/stf_run huggingface dataset:
from heapq import*
L,R=[]*2
B=t=0
Q,*E=open(0)
for e in E:
	if' 'in e:_,a,b=map(int,e.split());t=1-t;a*=2*t-1;c=heappushpop([L,R][t],a);heappush([R,L][t],-c);B+=b+a-c-c
	else:print(-L[0],B-L[0]*t)

### FIXED CODE ###

from heapq import*
L,R=[],[]
B=0
Q,*E=open(0)
for e in E:
    if e[0]>'1':
        w=-L[0]
        print(w,B+w*(len(L)>len(R)))
    else:
        _,a,b=map(int,e.split())
        B+=b
        if len(L)>len(R):
            B-=a
            a=-heappushpop(L,-a)
            B+=a+a
            heappush(R,a)
        else:
            B+=a
            a=heappushpop(R,a)
            B-=a+a
            heappush(L,-a)
num1 = input('整数を入力してください：')

while num1.replace('-', '').isdigit() == False or int(num1) < -100:
    print('Error')
    num1 = input('整数を入力してください：')
else:
    num1 = int(num1)
num1 = int(num1)



num2 = input('整数を入力してください：')

while num2.replace('-', '').isdigit() == False or int(num2) > 100:
    print('Error')
    num2 = input('整数を入力してください：')
else:
    num2 = int(num2)
num2 = int(num2)


plus = num1 + num2
minus = num1 - num2
times = num1 * num2

list = [plus,minus,times]

print(max(list))


### FIXED CODE ###

num1,num2 = map(int, input().split())

plus = num1 + num2
minus = num1 - num2
times = num1 * num2

list = [plus,minus,times]

print(max(list))
N = int(raw_inpit())
T, A = map(int, raw_input().split())
Hs = list(map(int, raw_input().split()))

Ts = list(map(lambda x: T-x * 0.006), Hs)

i = 0
v = 0
for _i, _T in enumerate(Ts):
    if abs(_T-T) < v:
        v = abs(_T-T)
        i = _i

print(i+1)


### FIXED CODE ###

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

Ts = list(map(lambda x: T-x * 0.006, Hs))

i = 0
v = None
for _i, _T in enumerate(Ts):
    if v is None or abs(_T-A) < v:
        v = abs(_T-A)
        i = _i

print(i+1)
# -*- coding: utf-8 -*-

line = input().strip()
while line!='':
	print(0)
	line = input().strip()

### FIXED CODE ###

from __future__ import division
import sys
if sys.version_info[0]>=3: raw_input=input

X=4
Y=2
i=0
m={}
prev={}
v=[]
for i in range(X*Y): v.append(str(i))
m[''.join(v)]=[0,0]
prev[''.join(v)]=[''.join(v),None]
q=[v]
while len(q)>0:
	v=q.pop(0)
	coor=m[''.join(v)][0]
	x=coor%X
	y=coor//X
	depth=m[''.join(v)][1]
	nextstr=''.join(v)
	if 0<x:
		v[coor],v[coor-1]=v[coor-1],v[coor]
		if ''.join(v) not in m:
			m[''.join(v)]=[coor-1,depth+1]
			q.append(v[:])
			prev[''.join(v)]=[nextstr,'R']
		v[coor],v[coor-1]=v[coor-1],v[coor]
	if x<X-1:
		v[coor],v[coor+1]=v[coor+1],v[coor]
		if ''.join(v) not in m:
			m[''.join(v)]=[coor+1,depth+1]
			q.append(v[:])
			prev[''.join(v)]=[nextstr,'L']
		v[coor],v[coor+1]=v[coor+1],v[coor]
	if 0<y:
		v[coor],v[coor-X]=v[coor-X],v[coor]
		if ''.join(v) not in m:
			m[''.join(v)]=[coor-X,depth+1]
			q.append(v[:])
			prev[''.join(v)]=[nextstr,'D']
		v[coor],v[coor-X]=v[coor-X],v[coor]
	if y<Y-1:
		v[coor],v[coor+X]=v[coor+X],v[coor]
		if ''.join(v) not in m:
			m[''.join(v)]=[coor+X,depth+1]
			q.append(v[:])
			prev[''.join(v)]=[nextstr,'U']
		v[coor],v[coor+X]=v[coor+X],v[coor]

try:
	while True:
		v=raw_input().split()
		print(m[''.join(v)][1])
except EOFError:
	pass
N=input()
print(N*N*N)

### FIXED CODE ###

N=int(input())
print(N*N*N)
X = input()

def STring(X):
  index = X.find("ST")
  if index == -1:
    return X
  else:
    return STring(X[0:index] + X[index + 2:])

print(len(STring(X)))


### FIXED CODE ###

string = input()
stack = []
for s in string:
    if s == "T" and stack and stack[-1] == "S":
        stack.pop()
    else:
        stack.append(s)
print(len("".join(stack)))
N, M = map(int, input().split())
a_list =  list(map(int, input().split()))
a_list.sort(reverse = True)
a_total = sum(a_list)
count = 0
for voted in a_list[:M]:
  if voted < (1/(4*M))*a_total:
    print("No")
    break
else:
  print("Yes")

### FIXED CODE ###

a, b, c = map(int, input().split())
#n=int(input())
#list_ = [input() for i in range(n)]
temp = a
a = b
b = temp
temp = a
a = c
c = temp

print(a,b,c)
list = input()
a = int(list[0])
b = int(list[1])

if a > b:
    print("a > b")
elif a == b:
    print("a == b")
else:
    print("a < b")

### FIXED CODE ###

list = input().split(" ")
a = int(list[0])
b = int(list[1])

if a > b:
    print("a > b")
elif a == b:
    print("a == b")
else:
    print("a < b")
N = int(input())
p = list(map(int,input().split()))

o=1
e=0
for i in p:
  if i != o:
    e +=1
  o +=1
if e=0 or e=2:
  print("YES")
else:
  print("NO")


### FIXED CODE ###

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

o=1
e=0
for i in p:
  if i != o:
    e +=1
  o +=1
if e==0 or e==2:
  print("YES")
else:
  print("NO")
r=int(input())
print(numpy.pi*2*r)

### FIXED CODE ###

import numpy as np

r=int(input())
print(np.pi*2*r)
n = int(input())
s = list(input())
ing_total = 0
for i in range(n):
    if s[i] == "A":
        if s[i + 1] == "B":
            if s[i+2] == "C":
                ing_total+= 1
print(ing_total)


### FIXED CODE ###

n = int(input())
s = input()
print(s.count("ABC"))
x = raw_input()
print x ** 2

### FIXED CODE ###

x = int(raw_input())
print x ** 3
from collections import deque
n, m = map(int, input().split())
r = [[0] for i in range(n+1)]
num = {0:0, 1:1}
e = deque([]) 
for i in range(m):
	a, b = map(int, input().split())
	r[a].append(b)
	r[b].append(a)
def c(x):
	for y in r[x]:
		if y not in num:
			num[y] = x
			e.append(y)
	if len(e) > 0:
		c(e.popleft())
	else:
		return
c(1)
print("Yes")
for i in range(2, n+1):
	print(num[i])

### FIXED CODE ###

from collections import deque
n, m = map(int, input().split())
r = [[0] for i in range(n+1)]
num = {0:0, 1:1}
e = deque([]) 
for i in range(m):
	a, b = map(int, input().split())
	r[a].append(b)
	r[b].append(a)
e.append(1)
while len(e) > 0:
	x = e.popleft()
	for y in r[x]:
		if y not in num:
			num[y] = x
			e.append(y)
print("Yes")
for i in range(2, n+1):
	print(num[i])
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)


a,b,c,d = map(int,input().split())
c_i=a//c
d_i=a//d
cd_i=a//(lcm(c,d))
if not a%c==0:
    c_i+=1
if not a%d==0:
    d_i+=1
if not a%(lcm(c,d))==0:
    cd_i+=1

c_f=b//c
d_f=b//d
cd_f=b//(lcm(c,d))

print(b-a-(c_f+d_f-cd_f-c_i-d_i+cd_i+1)+1)

### FIXED CODE ###

def gcd(m,n):
    x= max(m,n)
    y= min(m,n)
    if x%y == 0:
        return y
    else:
        while not x%y==0:
            z=x%y
            x= y
            y=z
        else:
            return z
def lcm(x, y):
    return (x * y) // gcd(x, y)


a,b,c,d = map(int,input().split())
lcm = lcm(c,d)
c_i=a//c
d_i=a//d
cd_i=a//lcm
if not a%c==0:
    c_i+=1
if not a%d==0:
    d_i+=1
if not a%lcm==0:
    cd_i+=1

c_f=b//c
d_f=b//d
cd_f=b//lcm

print(b-a-(c_f+d_f-cd_f-c_i-d_i+cd_i+1)+1)
n = int(input())
a = []
for i in range(n):
    _ = list(map(int, input().split()))
    a.append(_)
if n == 1:
    print(str(a[0][0]) + ' ' + str(a[0][1]) + ' ' + str(a[0][2])) 
else:    
    check = False
    for i in range(101):
        for j in range(101):
            b = 0
            while b < n:
                if b == 0:
                    h = abs(i - a[b][0]) + abs(j - a[b][1]) + a[b][2]
                    b +=1
                else:
                    de = max(h - abs(i - a[b][0]) - abs(j - a[b][1]),0)
                    if de == a[b][2]:
                        b+=1
                    else:
                        break
            if b == n:
                ans = str(i) + ' ' + str(j) + ' ' +str(h)
                check = True
            if check:
                break
        if check:
            break
    print(ans)

### FIXED CODE ###

n = int(input())
a = []
for i in range(n):
    _ = list(map(int, input().split()))
    a.append(_)
a = sorted(a, key=lambda x:x[2],reverse = True)

check = False
    
for i in range(101):
    for j in range(101):
        b = 0
        while b < n:
            if b == 0:
                h = abs(i - a[b][0]) + abs(j - a[b][1]) + a[b][2]
                b +=1
            else:
                de = max(h - abs(i - a[b][0]) - abs(j - a[b][1]),0)
                if de == a[b][2]:
                    b+=1
                else:
                    break
        if b == n:
            ans = str(i) + ' ' + str(j) + ' ' +str(h)
            check = True
        if check:
            break
    if check:
        break
print(ans)
import numpy as np
k,x = map(int,input().split())

result = np.linspace(x-k+1,x+k-1,k*2-1,dtype = 'int')

for i in range(k*2-1):
    print(str(result[i]),end = "　")

### FIXED CODE ###

import numpy as np
k,x = map(int,input().split())

result = np.arange(x-k+1,x+k,1,dtype = 'int')

for i in range(len(result)):
    print(result[i],end = " ")
n = int(input())
a = [int(input()) for i in range(n)]
res = 0
temp_max = 0
for x in a:
    if temp_max > x:
        res += temp_max - x
    temp_max = max(temp_max,x)

print(res)

### FIXED CODE ###

n = int(input())

if n%9 ==0:
    print("Yes")
else:
    print("No")
N, K = map(int, input().split())
if N >= K:
    ans = N % K
else:
    ans = 1
print(b)

### FIXED CODE ###

N, K = map(int, input().split())
if N % K == 0:
    ans = 0
else:
    ans = 1
print(ans)
# C - Average Length

N = int(input())
arr = []
for i in range(N):
    tmp = list(map(int, input().split()))
    arr.append(tmp)

####

import math
import statistics
import itertools

table = [[0]*N for i in range(N)]
for i in range(N):
    ti = arr[i]
    for j in range(N):
        tj = arr[j]
        dist = math.sqrt((ti[0] - tj[0])**2 + (ti[1] - tj[1])**2)
        #print(i, j, ti, tj, dist)
        table[i][j] = dist

#print(table)

kumi_all = list(itertools.permutations(range(N)))
kumi_all_count = len(kumi_all)

total_dist = 0

for i in range(kumi_all_count):
    this_dist = 0
    this_kumi = kumi_all[i]

    for j in range(N-1):
        this_dist += table[this_kumi[j]][this_kumi[j+1]]

    #print("{}: {}".format(i, this_dist))
    total_dist += this_dist

#print(total_dist, stop_loop)
avr_dist = total_dist / stop_loop

print(avr_dist)


### FIXED CODE ###

# C - Average Length

N = int(input())
arr = []
for i in range(N):
    tmp = list(map(int, input().split()))
    arr.append(tmp)

####

import math
import statistics
import itertools

table = [[0]*N for i in range(N)]
for i in range(N):
    ti = arr[i]
    for j in range(N):
        tj = arr[j]
        dist = math.sqrt((ti[0] - tj[0])**2 + (ti[1] - tj[1])**2)
        table[i][j] = dist

kumi_all = list(itertools.permutations(range(N)))
kumi_all_count = len(kumi_all)

total_dist = 0

for i in range(kumi_all_count):
    this_dist = 0
    this_kumi = kumi_all[i]

    for j in range(N-1):
        this_dist += table[this_kumi[j]][this_kumi[j+1]]

    total_dist += this_dist

avr_dist = total_dist / kumi_all_count

print(avr_dist)
from collections import deque

H,W=map(int,input().split())
grid=[input() for _ in range(H)]
dist=[[-1]*W for _ in range(H)]

M=deque()
for i in range(W):
    for j in range(H):
        if grid[i][j]=="#":
            M.append((i,j))
            dist[i][j]=0

def bfs(M,dist):
    d=0
    while M:
        x,y=M.popleft()
        d=dist[x][y]
        for dx,dy in ((1,0),(0,1),(-1,0),(0,-1)):
            new_h=x+dx
            new_w=y+dy
            if new_h < 0 or H <= new_h or new_w <0 or W <= new_w:
                continue
            if dist[new_h][new_w] == -1:
                dist[new_h][new_w]=d+1
                M.append((new_h,new_w))
    return d

d=bfs(M,dist)
print(d)

### FIXED CODE ###

from collections import deque

H,W=map(int,input().split())
grid=[input() for i in range(H)]
dist=[[-1]*W for _ in range(H)]

black_cells=deque()
for h in range(H):
    for w in range(W):
        if grid[h][w] == "#":
            black_cells.append((h,w))
            dist[h][w]=0

def bfs(black_cells,dist):
        d=0
        while black_cells:
            h,w=black_cells.popleft()
            d=dist[h][w]
            for dx, dy in ((1,0),(0,1),(-1,0),(0,-1)):
                new_h=h+dy
                new_w=w+dx
                if new_h <0 or H <= new_h or new_w < 0 or W<=new_w:
                    continue
                if dist[new_h][new_w]==-1:
                    dist[new_h][new_w]=d+1
                    black_cells.append((new_h,new_w))
        return d

d=bfs(black_cells,dist)
print(d)
from collections import deque

INF = float("inf")

H, W, K = map(int, input().split())
A = [list(input()) for _ in range(H)]

Si, Sj = (0, 0)
for i, a in enumerate(A):
    if "S" in a:
        Si, Sj = (i, a.index("S"))
        break

dist = [[INF] * W for _ in range(H)]
dist[Si][Sj] = 0

ans = INF

Q = deque([(Si, Sj)])
while Q:
    i, j = Q.popleft()

    ans = min(
        1 + (i + K - 1) // K,
        1 + (j + K - 1) // K,
        1 + (H - 1 - i + K - 1) // K,
        1 + (W - 1 - j + K - 1) // K
    )

    if dist[i][j] == K:
        continue

    distance = dist[i][j] + 1

    for di, dj in ((1, 0), (0, 1), (-1, 0), (0, -1)):
        ni, nj = i + di, j + dj

        if not (0 <= ni < H or 0 <= nj < W) and A[ni][nj] == "#":
            continue

        if dist[ni][nj] > distance:
            dist[ni][nj] = distance
            Q.append((ni, nj))

print(ans)


### FIXED CODE ###

from collections import deque

INF = float("inf")

H, W, K = map(int, input().split())
A = [list(input()) for _ in range(H)]

Si, Sj = (0, 0)
for i, a in enumerate(A):
    if "S" in a:
        Si, Sj = (i, a.index("S"))
        break

dist = [[INF] * W for _ in range(H)]
dist[Si][Sj] = 0


ans = INF

Q = deque([(Si, Sj)])
while Q:
    i, j = Q.popleft()

    ans = min(
        ans,
        1 + (i + K - 1) // K,
        1 + (j + K - 1) // K,
        1 + (H - 1 - i + K - 1) // K,
        1 + (W - 1 - j + K - 1) // K
    )

    if dist[i][j] == K:
        continue

    distance = dist[i][j] + 1

    for di, dj in ((1, 0), (0, 1), (-1, 0), (0, -1)):
        ni, nj = i + di, j + dj

        if not (0 <= ni < H and 0 <= nj < W and A[ni][nj] == "."):
            continue

        A[ni][nj] = "#"

        if dist[ni][nj] > distance:
            dist[ni][nj] = distance
            Q.append((ni, nj))

print(ans)
array = [int(input()) for i in range(5)]
array_sub = [i % 10 for i in array]
new_lst = [i for i in array_sub if i != 0]
minimum = min(new_lst)
sum = 0
for i in array:
  if (i % 10 == minimum):
    sum += i
  else 
  	sum += i + (10 - i % 10)
print(sum)
 


### FIXED CODE ###

array1 = [int(input()) for i in range(5)]
array2 = [i for i in array1 if i % 10 == 0]
array3 = [i for i in array1 if i % 10 != 0]
array4 = [i % 10 for i in array3]
sum1 = 0
sum2 = sum(array2)
if (len(array3) != 0):
  idx = array4.index(min(array4))
  for k, i in enumerate(array3):
    if (k == idx):
      sum1 += i
    else:
      sum1 += i + (10 - i % 10)
print(sum1 + sum2)
x,y,z=map(int,input().split())
a=max(x,y,z)
b=min(x,y,z)
c=x+y+z-a-b
if (a-b)%2==0:
	d=(a-b)/2
	if (a-c)%2==0:
		print(int((a-c)/2+d))
	else:
		print(int((a-1-c)/2+d+2))
else:
	e=(a-b-1)/2
	if (a-c)%2==0:
		print(int((a-c)/2+2+e))
	else:
		print(int((a-1-c)/2+1+e))


### FIXED CODE ###

a= str(input())
if a=='abc':
	print("Yes")
elif a=='acb':
	print("Yes")
elif a=='bac':
	print("Yes")
elif a=='bca':
	print("Yes")
elif a== 'cab':
	print("Yes")
elif a=='cba':
	print("Yes")
else:
	print("No")
n,k=map(int,input().split())
lst=[for _ in range(1,n+1)]
for i in range(k):
  x=int(input())
  a=list(map(int,input().split()))
  b=set(a)
  for j in b:
    lst.remove(j)
print(len(lst))

### FIXED CODE ###

n,k=map(int,input().split())
lst=[_ for _ in range(1,n+1)]
for i in range(k):
  x=int(input())
  a=list(map(int,input().split()))
  b=set(a)
  for j in b:
    if j in lst:
      lst.remove(j)
print(len(lst))
S=input()
i=0
while S[i]!='1':
  i+=1
else:
  i=0
print(S[i])

### FIXED CODE ###

S=input()
K=int(input())
i=0
while S[i]=='1' and K>i+1 and i<len(S):
  i+=1
if i==len(S):
  i=0
print(S[i])
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

a = 0 if N<K else N-k
cost = X*K + Y*a

print(cost)

### FIXED CODE ###

N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if N<K: 
    cost = X*N
else:
    cost = X*K + Y*(N-K)

print(cost)
N = int(input())
 
s = "abcdefghijklmnopqrstuvwxyz"
ans = ""
n, m = 0, 0
 
for i in range(1, 1000):
    m += 26**i
    if N <= m:
        n = i -1
        break

for i in reversed(range(n)):
    a, b = divmod(N, 26**i)
    N = b
    if not a ==0:
      ans += s[a-1]
    else:
      ans += s[25]

print(ans)

### FIXED CODE ###

N = int(input())

s = "abcdefghijklmnopqrstuvwxyz"
ans = ""
n, m = 0, 0

for i in range(1, 1000):
    m += 26 ** i
    if N <= m:
        n = i
        break

for i in range(n):
    a, b = divmod(N, 26)
    N = a
    if b == 0:
        ans += s[25]
        N -= 1
    else:
        ans += s[b-1]

ans1 = ''.join(list(reversed(ans)))
print(ans1)
#abc103 b
s=input()
t=input()
flag=False
for i in range(len(s)):
    new_t=t[-1]
    new_t+=t[:-1]
    if new_t==s:
        flag=True
        break
    t=new_t

print("Yes" if flag else "No" )
    

### FIXED CODE ###

#abc103 a
a=list(map(int,input().split()))
a.sort()
ans=abs(a[0]-a[1])+abs(a[1]-a[2])
print(ans)
Q, H, S, D = map(int,input().split())
N = int(input())

if N % 2 == 1:
    ans = min(4*Q,2*H,S)
ans += (N//2) * min(8*Q, 4*H, 2*S, D)

print(ans)


### FIXED CODE ###

Q, H, S, D = map(int,input().split())
N = int(input())

ans = 0
if N % 2 == 1:
    ans = min(4*Q,2*H,S)
ans += (N//2) * min(8*Q, 4*H, 2*S, D)

print(ans)
import numpy as np
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ls=[a,b,c,d,e]
ls_1=[]
for i in range(len(ls)):
    ls_1.append(int(str(ls[i])[-1]))
ls_1=np.array(ls_1)
ls_1=10-ls_1
ls_1_10=ls_1[ls_1 < 10]#１０を除いたロス
a=np.argmax(ls_1_10)#最大の１の位を探す
ls_non=np.delete(ls_1_10, a, 0)
#ls_non_10=ls_non[ls_non < 10]
ls=np.array(ls)
ans=np.sum(ls) + np.sum(ls_non)
print(ans)

### FIXED CODE ###

#１のくらいのみ見れはいい？
import numpy as np
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ls=[a,b,c,d,e]
ls_1=[]
for i in range(len(ls)):
    ls_1.append(int(str(ls[i])[-1]))
ls_1=np.array(ls_1)
ls_1_10=10-ls_1
ls_1_10[ls_1_10==10]=0
#ls_1_10=ls_1[ls_1 < 10]#１０を除いたロス
a=np.argmax(ls_1_10)#最大の１の位を探す
ls_non=np.delete(ls_1_10, a, 0)
#ls_non_10=ls_non[ls_non < 10]
ls=np.array(ls)
ans=np.sum(ls) + np.sum(ls_non)
print(ans)
S = str(input())
ans = 0
for i in range(len(S)):
  if S[i] == "+":
    ans += 1
   else:
    ans -= 1

print(ans)

### FIXED CODE ###

S = input()
ans = 0
for i in range(4):
  if S[i] == "+":
    ans += 1
  else:
    ans -= 1
print(ans)
N, K, X, Y = map(int, input().split())

a = N * X

b = K * X + (N - K) * Y

if N < K:
    print(a)
else:
    print(b)

### FIXED CODE ###

N = int(input())    # 宿泊数
K = int(input())    # 単価が切り替わる泊数
X = int(input())    # 単価a
Y = int(input())    # 単価b


if N <= K:
    a = N * X
else:
    a = K * X + Y * (N - K)

print(a)
import numpy as np
n = int(input())
a = [int(i) for i in input().split()]
a = np.array(a, dtype='int64')
a.sort()
for i in range(n):
    if a[i] > 0:
        k = i
        break
a = np.absolute(a)
a.sort()

if k % 2 == 0:
    print(np.sum(a))
else :
    print(np.sum(a)- a[0]*2)

### FIXED CODE ###

import numpy as np
n = int(input())
a = [int(i) for i in input().split()]
a = np.array(a, dtype='int64')
k = np.sum(a < 0)
a = np.absolute(a)
a.dtype ='uint64'
a.sort()

if k % 2 == 0:
    print(int(np.sum(a)))
else :
    print(int(np.sum(a)- a[0]*2))
def insertionSort(A,n,g):
    cnt = 0
    for i in range(g,n):
            v = A[i]
            j = i - g
            while j >= 0 and A[j] > v:
                    A[j+g] = A[j]
                    j = j - g
                    cnt += 1
                    A[j+g] = v
    return cnt
def shellsort(A,n):
    cnt = 0
    h = 1
    G = []
    while h <= 1:
        G.append(h)
        h = 3*h + 1
    G.reverse()
    m = len(G)
    print(m

    print(" ".join(map(str,G)))
    for i in range(m):
        cnt += insertionSort(A,n,G[i])
    print(cnt)
    for i in A:
        print(i)
n = int(input())
A = []
for _ in range(n):
    A.append(int(input()))
shellsort(A,n)




### FIXED CODE ###

def insertionSort(A,n,g):
    cnt = 0
    for i in range(g,n):
        v = A[i]
        j = i - g
        while j >= 0 and A[j] > v:
            A[j+g] = A[j]
            j = j - g
            cnt += 1
            A[j+g] = v
    return cnt
    
def shellsort(A,n):
    cnt = 0
    h = 1
    G = []
    while h <= n:
        G.append(h)
        h = 3*h + 1
    G.reverse()
    m = len(G)
    print(m)

    print(" ".join(map(str,G)))
    for i in range(m):
        cnt += insertionSort(A,n,G[i])
    print(cnt)
    for i in A:
        print(i)
        
n = int(input())
A = []
for _ in range(n):
    A.append(int(input()))
shellsort(A,n)
import sys
read = sys.stdin.read
MOD = 10**9+7

n, *C = map(int, read().split())
dp = [0]*(n+1)
dp[0] = 1
idx = [-1]*(10**5+1)
for i, c in enumerate(C, 1):
  dp[i] = dp[i-1]
  if idx[c] != -1 and idx[c] < i-1:
    dp[i] += dp[idx[c]]
    dp[i] %= MOD
  idx[c] = i
print(dp[-1])

### FIXED CODE ###

import sys
read = sys.stdin.read
MOD = 10**9+7

n, *C = map(int, read().split())
dp = [0]*(n+1)
dp[0] = 1
idx = [-1]*(2*10**5+1)
for i, c in enumerate(C, 1):
  dp[i] = dp[i-1]
  if idx[c] != -1 and idx[c] < i-1:
    dp[i] += dp[idx[c]]
    dp[i] %= MOD
  idx[c] = i
print(dp[-1])
l=[int(input()) for _ in range(int(input()))]
s=[]

isno=False
for i in l:
    if i=="A":
        s.append(1)
    else:
        try:
            _=s.pop()
        except:
            print("NO")
            isno=True
            break

if not isno and not s:print("YES")
elif not isno and s:print("NO")



### FIXED CODE ###

l=[input() for _ in range(int(input()))]
s=[]

isno=False
for i in l:
    if i=="A":
        s.append(1)
    else:
        try:
            _=s.pop()
        except:
            print("NO")
            isno=True
            break

if not isno and not s:print("YES")
elif not isno and s:print("NO")
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    H = [int(i) for i in input().split()]
    # マスの高さを1つ引くくすること
    # なにもしない
    # 単調非減少ってなんだ
    # 左より低くならないようにすれば良いっぽいな
    # N = 10 ** 5
    # h = 10 ** 9
    # example:
    # 1 2 1 1 -> 1 1 1 1 -> Yes
    # 1 2 2 1 -> 1 2 1 1 -> No
    # 1 2 3 1 -> 1 2 2 1 -> No
    # 1 100 1 1 -> 1 99 1 1 -> No
    #

    cnt = 0
    # とりあえず、愚直に書いてみる
    a = None
    b = H[0]
    for i in range(1, n + 1):
        c = H[i]
        sa = c - b
        if sa < -1:
            cnt = 2
            break
        elif sa < 0:
            if a and a == b:
                cnt = 2
                break
            cnt += 1
        a = b
        b = c
        if cnt > 1:
            break
    print("Yes" if cnt <= 1 else "No")


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys

input = sys.stdin.readline


def main():
    n = int(input())
    H = [int(i) for i in input().split()]

    flg = True
    max_ = -1
    for h in H:
        if h < max_:
            flg = False
            break
        if h == max_:
            continue
        max_ = h - 1
    print("Yes" if flg else "No")


if __name__ == "__main__":
    main()
seq = map(int, input().split)

seq.sort()

a, b, c = seq

if a + b == c:
    print('Yes')
    
else:
    print('No')

### FIXED CODE ###

seq = [int(x) for x in input().split()]
seq.sort()

a, b, c = seq

if a + b == c:
    print('Yes')
    
else:
    print('No')