Harryxun/stf_run huggingface dataset:
N=int(input())
Y=int(input())

for i in range(0,N+1):
    a=10000*i
    if a>Y:
        continue
    for j in range(0,N-i+1):
        a+=5000*j
        if a>Y:
            continue
        for k in range(0,N-i-j+1):
            a+=1000*k
            if 10000*i+5000*j+1000*k==Y:
                print(i," ",j," ",k)
                break
else:
    print(-1,' ',-1,' ',-1)
    


### FIXED CODE ###

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

a=-1
b=-1
c=-1
for i in range(0,N+1):
    for j in range(0,N-i+1):
        if 10000*i+5000*j+1000*(N-i-j)==Y:
            a=i
            b=j
            c=N-i-j
            break
                            
print(a,b,c)
l2 = raw_input().split()
l= [int(s, 16) for s in l2]

if l[0] < l[1]:
  print("<")
elif l[0] = l[1]:
  print ("=")
elif l[0] > l[1]:
  print(">")

### FIXED CODE ###

l = input().split()
l2 = [int(s, 16) for s in l]

if l2[0] < l2[1]:
  print("<")
elif l2[0] == l2[1]:
  print ("=")
elif l2[0] > l2[1]:
  print(">")
n = input()
  max = -1*10**9
  min = input()

  for i in range(0, n-1):
    a = input()
    if max < a - min:
      max = a - min
    if a < min:
      min = a

  print max

### FIXED CODE ###

n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9
  
for j in range(n-1):
  nums = int(raw_input())  
  diff = nums - minv
  if maxv < diff:
    maxv = diff
  if nums < minv:
    minv = nums
  
print maxv
table = [0] * 4*3*10

n = int(input())

for i in range(n):
    b,f,r,v = map(int, input().split())
    table[30(b-1)+10(f-1)+(r-1)] += v

for i in range(120):
    if i % 30:
        print("####################")
    print(table[i], end="")
    if i%10 ==9:
        print()
    else:
        print(" ", end="")



### FIXED CODE ###

#
# 6c
#


def main():
    A = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]
    n = int(input())
    for i in range(n):
        b, f, r, v = map(int, input().split())
        A[b-1][f-1][r-1] += v
    for i in range(4):
        for j in range(3):
            print(" ", end="")
            print(*A[i][j])
        if i < 3:
            print("#" * 20)


if __name__ == '__main__':
    main()
N,M=map(int,input().split())
a=[]
for i in range(0,M):
    a.append(int(input()))
ans=1
s=[-1]*(N+1)
s[0]=1
def dp(n):
    if n==0:
        return 1
    elif n==1:
        return 0 if 1 in a else 1
    if s[n-1]!=-1:
        c=s[n-1]
    elif n-1 in a:
        s[n-1]=0
        c=0
    else:
        c=dp(n-1)%1000000007
        s[n-1]=c
    if s[n-2]!=-1:
        b=s[n-2]
    elif n-2 in a:
        s[n-2]=0
        b=0
    else:
        b=dp(n-2)%1000000007
        s[n-2]=b
    return (c+b)%1000000007
print(dp(N)%1000000007)

### FIXED CODE ###

import sys #追加
sys.setrecursionlimit(50000000) #追加
N,M=map(int,input().split())
a=[]
for i in range(0,M):
    a.append(int(input()))
a=set(a)
if M==0:
    a=[-1]
ans=1
s=[-1]*(N+1)
s[0]=1
def dp(n):
    if n==0:
        return 1
    elif n==1:
        return 0 if 1 in a else 1
    if s[n-1]!=-1:
        c=s[n-1]
    elif n-1 in a:
        s[n-1]=0
        c=0
    else:
        c=dp(n-1)%1000000007
        s[n-1]=c
    if s[n-2]!=-1:
        b=s[n-2]
    elif n-2 in a:
        s[n-2]=0
        b=0
    else:
        b=dp(n-2)%1000000007
        s[n-2]=b
    return (c+b)%1000000007
print(dp(N)%1000000007)
n = int(input())
a = [input() for i in range(n)]

max_mergin = -200000
min_value = a[0]
for abc in range(a):
    max_mergin = max(max_mergin,abc - min_value)
    min_value = min(min_value,abc)
    
print(max_mergin)



### FIXED CODE ###

n = int(input())
R = [int(input()) for i in range(n)]

minv = R[0]
maxv = R[1] - R[0]
for j in range(1, n):
	if (maxv < R[j] - minv):
		maxv = R[j] - minv
	if (R[j] < minv):
		minv = R[j]
    
print(maxv)
import math
n,k=map(int,input().split())
t=math.log(n,k)
if t==int(t):
    print(int(t))
else:
    print(int(t)+1)


### FIXED CODE ###

n,k=map(int,input().split())
if n<10:
    print(k+100*(10-n))
else:
    print(k)
N,K=map(int,input().split())
XY=[list(map(int,input().split())) for i in range(N)]

Mlst=set()
for s in range(N-1):
    for g in range(s,N):
        for z in range(g,N):
            x1,y1=XY[s]
            x2,y2=XY[g]
            x3,y3=XY[z]
            x1,x2=min(x1,x2,x3),max(x1,x2,x3)
            y1,y2=min(y1,y2,y3),max(y1,y2,y3)
            if sum([x1<=X<=x2 and y1<=Y<=y2 for X,Y in XY])>=K:
                Mlst.add((y2-y1)*(x2-x1))
print(min(Mlst))


### FIXED CODE ###

N,K=map(int,input().split())
XY=[list(map(int,input().split())) for i in range(N)]
XY=sorted(XY,key=lambda x:x[0])
Mlst=[]

if N>=2:
    for s1 in range(N-1):
        for s2 in range(s1+1,N):
            x1,y1=XY[s1]
            x2,y2=XY[s2]
            y1,y2=min(y1,y2),max(y1,y2)
            count=2
            for i in range(s1+1,s2):
                count+=y1<=XY[i][1]<=y2
            if count>=K:
                Mlst.append((y2-y1)*(x2-x1))
if N>=3:
    for s1 in range(N-2):
        for s2 in range(s1+1,N-1):
            for s3 in range(s2+1,N):
                x1,y1=XY[s1]
                x2,y2=XY[s2]
                x3,y3=XY[s3]
                x1,x2=x1,x3
                y1,y2=min(y1,y2,y3),max(y1,y2,y3)
                count=2
                for i in range(s1+1,s3):
                    count+=y1<=XY[i][1]<=y2
                if count>=K:
                    Mlst.append((y2-y1)*(x2-x1))
if N>=4:
    for s1 in range(N-3):
        for s2 in range(s1+1,N-2):
            for s3 in range(s2+1,N-1):
                for s4 in range(s3+1,N):
                    x1,y1=XY[s1]
                    x2,y2=XY[s2]
                    x3,y3=XY[s3]
                    x4,y4=XY[s4]
                    x1,x2=x1,x4
                    y1,y2=min(y1,y2,y3,y4),max(y1,y2,y3,y4)
                    count=2
                    for i in range(s1+1,s4):
                        count+=y1<=XY[i][1]<=y2
                    if count>=K:
                        Mlst.append((y2-y1)*(x2-x1))
print(min(Mlst))
N = int(input())
alpha = [chr(i) for i in range(97, 97+26)]

if N <= 26:
    print(alpha[N-1])
else:
    digit = 1
    tmp = 26
    while True:
        if N <= tmp:
            break
        digit += 1
        tmp += 26 ** digit

    ans = ''
    for i in range(digit):
        ans += alpha[N // (26 ** (digit - i - 1)) - 1]
        N = N - ((N // (26 ** (digit - i - 1))) * (26 ** (digit - i - 1)))

    print(ans)

### FIXED CODE ###

N = int(input())

az = [chr(i) for i in range(97, 97+26)]

N = N - 1

tmp1 = 0
for i in range(1, 1000):
    tmp1 += 26 ** i
    if tmp1 > N:
        num = i
        tmp1 -= 26 ** i
        N -= tmp1
        break

tmp = [0 for _ in range(num)]
for i in range(num):
    tmp[i] = N%26
    N = N // 26

ans = ""
for i in range(len(tmp)):
    ans = az[tmp[i]] + ans

print(ans)
N=int(input())
sisterN=[]
SISTERn=[]
SIStern=[]
for n in range(N):
    _=int(input())
    if _<40000:
        _s= _
        if sisterN.count(_s)==1:
            sisterN.remove(_s)
        else:
            sisterN.append(_s)
    elif 40001<_<99990:
        _m= _
        if SISterN.count(_m)==1:
            SISterN.remove(_m)
        else:
            SISterN.append(_m)
    else:
        _b= _
        if SISTERn.count(_b)==1:
            SISTERn.remove(_b)
        else:
            SISTERn.append(_b)

print(len(sisterN)+len(SISTERn)+len(SIStern))

### FIXED CODE ###

N=int(input())
S=set()

for n in range(N):
    _=int(input())
    if _ in S:
        S.remove(_)
    else:
        S.add(_)

print(len(S))
from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().split()]

min_eight_ex_tax = float(A / 0.08)
max_eight_ex_tax = float((A + 1) / 0.08)
min_ten_ex_tax = int(B / 0.1)
max_ten_ex_tax = int((B + 1) / 0.1)

res = float(-1)
for x in range(min_ten_ex_tax, max_ten_ex_tax, 1):
    if min_eight_ex_tax <= x < max_eight_ex_tax:
        res = float(x)
        break
#print(min_eight_ex_tax, max_eight_ex_tax, min_ten_ex_tax, max_ten_ex_tax)
print(int(res))

### FIXED CODE ###

from sys import stdin

s = stdin.readline().rstrip()

count = 0
if s[0] == 'A':
    if s[1] == 'B':
        count += 1
if s[1] == 'A':
    if s[2] == 'B':
        count += 1
if s[0] == 'B':
    if s[1] == 'A':
        count += 1
if s[1] == 'B':
    if s[2] == 'A':
        count += 1
if count > 0:
    print('Yes')
else:
    print('No')
a = input()
b = [i for i in a]
if b[0] == "?":
    bin[0] = "D"
for i in range(1, len(t) - 1):
    if b[i] == "?":
        if b[i-1] == "D" and b[i+1] == "D":
            b[i] = "P"
        elif b[i-1] == "D" and b[i+1] == "?":
            b[i] = "P"
        else:
            b[i] = "D"
if b[-1] == "?":
    b[-1] = "D"
print("".join(b))

### FIXED CODE ###

t = input()
s = [i for i in t]
if s[0] == "?":
    s[0] = "D"
for i in range(1, len(t) - 1):
    if s[i] == "?":
        if s[i-1] == "D" and s[i+1] == "D":
            s[i] = "P"
        elif s[i-1] == "D" and s[i+1] == "?":
            s[i] = "P"
        else:
            s[i] = "D"
if s[-1] == "?":
    s[-1] = "D"
print("".join(s))
N=int(input())
if N%2==1:
  print(0)
else:
  n=N//2
  A=n
  a=0
  b=0
  while A>=5**a:
    a+=1
  while A>=2**b:
    b+=1

cntfive=0  
cnttwo=0
for i in range(1,a):
  cntfive+=n//(5**i)
for j in range(1,b):
  cnttwo+=n//(2**j)

ans=min(cntfive,cnttwo+n)
print(ans)

### FIXED CODE ###

N=int(input())
if N%2==1:
  print(0)
else:
  n=N//2
  A=n
  a=0
  b=0
  while A>=5**a:
    a+=1
  while A>=2**b:
    b+=1

  cntfive=0  
  cnttwo=0
  for i in range(1,a):
    cntfive+=n//(5**i)
  for j in range(1,b):
    cnttwo+=n//(2**j)

  ans=min(cntfive,cnttwo+n)
  print(ans)
S=input()
print( "Yes" if S in "abc"  or S in "bca" or S in "acb" S in "cab" or S in "cba" or S in "bac" else "No" ) 

### FIXED CODE ###

S=input()
print( "Yes" if S.count("a") == S.count("b") == S.count("c") == 1 else "No")
A,B,K = map(int,input().split())
l = list(range(A,B+1))
del l[K:-K]
for e in l:
  print(e)

### FIXED CODE ###

A,B,K = map(int,input().split())
if B - A + 1 <= 2 * K:
    l = list(range(A,B + 1))
else:
    l1 = list(range(A,A + K))
    l2 = list(range(B - K + 1,B + 1))
    l = l1 + l2
for e in l:
    print(e)
i1 = input()
i2 = int(i1.split(" ")[0])
i3 = float(i1.split(" ")[1])
i4 = 0
i5 = 0
i6 = 0
li = []
for i in range(i2):
  i4 = input().split(" ")
  i5 = ((i4[1]) ** 2 - int(i4[0]) ** 2) ** 0.5
  if (i3 >= i5):
    i6 += 1
print(i6)

### FIXED CODE ###

i1 = input()
i2 = int(i1.split(" ")[0])
i3 = int(i1.split(" ")[1])
i4 = 0
i5 = 0
i6 = 0
li = []
for i in range(i2):
  i4 = input().split(" ")
  i5 = (float(i4[1]) ** 2 + float(i4[0]) ** 2) ** 0.5
  if i3 >= abs(i5):
    i6 += 1
print(i6)
X = list(map(int,input()))

for i in range(len(X)):
  if X[i]==0:
    print(i+1)
    

### FIXED CODE ###

X = list(map(int,input().split()))

for i in range(5):
  if X[i]==0:
    print(i+1)
s = input()
s[3] = '8'
print(s)

### FIXED CODE ###

s = input()
print('2018'+s[4:])
from math import inf
N, M = list(map(int, input().split(" ")))
keys = []
for _ in range(M):
	c = list(map(int, input().split(" ")))
	j = list(map(int, input().split(" ")))
	keys.append([c[0], sum([1 << k-1 for k in j])])
dp = [inf for _ in range(1 << N)]
dp[0] = 0
for i in range(len(dp)):
    for key in keys:
        t = i | key[1]
        dp[t] = min(dp[t], key[0] + dp[i])
if dp[-1]==inf:
    print(-1)
else:
    print(dp[-1])

### FIXED CODE ###

def main():
  Inf = 10**8
  N, M = list(map(int, input().split(" ")))
  keys = []
  for _ in range(M):
      c = list(map(int, input().split(" ")))
      j = list(map(int, input().split(" ")))
      keys.append([c[0], sum([1 << k-1 for k in j])])
  dp = [Inf for _ in range(1 << N)]
  dp[0] = 0
  for i in range(len(dp)):
      for key in keys:
          t = i | key[1]
          dp[t] = min(dp[t], key[0] + dp[i])
  if dp[-1]==Inf:
      print(-1)
  else:
      print(dp[-1])
main()
a=input()
b=('abcdefghijklmnopqrstuvwxyz')
for i in range(int(len(b)):
	if b[i]==a:
    	print(b[i+1])
              

### FIXED CODE ###

print(chr(ord(input())+1))
N = int(input())
mydict = []
for i in range(N):
  a, b=input().split()
  mydict.append([str(a), int(b)])
mydict.sort()
fot i in range(N):
  print(mydict[i][1])

### FIXED CODE ###

N = int(input())
mydict = []
for i in range(1, N+1):
  a, b=input().split()
  mydict.append([str(a), int(b), i])
mydict = sorted(mydict, key=lambda x:x[1], reverse=True)
mydict = sorted(mydict, key=lambda x:x[0])
for i in mydict:
  print(i[2])
from fractions import gcd
import math
import numpy as np
N = list(map(int, input().split()))
g = gcd(N[0], N[1])
original_g = g
max_prime = g + 2
primes = np.ones(max_prime)
#print(g+1, primes.shape)
primes[0:2] = 0
#print(primes)
for i in range(2, max_prime):
  if i * 2 < max_prime:
    primes[i*2::i] = 0
    #print(i, primes)
    
primes = np.arange(max_prime)[primes == 1]
#print(primes)

factor = []
for i in primes:
  if g % i == 0:
    #print(g)
    factor.append(i)

#print(g, original_g, factor)
print(len(factor) + 1)


### FIXED CODE ###

from fractions import gcd
import math
import numpy as np
N = list(map(int, input().split()))
g = gcd(N[0], N[1])

def factorize(g):
  factor = []
  for i in range(2, int(np.sqrt(g))+2):
    if g % i != 0:
      continue
    while g % i == 0:
      g //= i
    factor.append(i)
  if g != 1:
    factor.append(g)
  return factor
print(len(factorize(g))+1)
s=list(input())

if s[0] == s[1] and s[1] == [2] and s[2] == s[0]: 
	print("No")
else if s[0] != s[1] and s[1] != [2] and s[2] != s[0]:
	print("No")
else:
	print("Yes")

### FIXED CODE ###

s=list(map(int,input().split()))

if s[0] == s[1] == s[2]: 
	print("No")
elif s[0] != s[1] != s[2] != s[0]:
	print("No")
else:
	print("Yes")
x,k,d = list(map(int,input().split()))
c = x//d
if c >= k:
    print(x-k*d)
else:
    x = x%(c*d)
    k-=c
    if k&1:
        print(abs(x-d))
    else:
        if x < abs(x-d):
            print(x)
        else:
            print(abs(x-d))

### FIXED CODE ###

x,k,d = list(map(int,input().split()))
x = abs(x)
mst = x//d
if mst&1 != k&1:
    mst+=1
print(abs(x-(min(mst,k))*d))
K,N=map(int,input().split())
A=list(map(int,input().split()))
d=0
for i in range(N-1):
  b=A[i+1]-A[i]
  if A[i+1]-A[0] >= K/2:
    d=d+A[i]-A[0]+K-A[i+1]
print(d)
  

### FIXED CODE ###

S=input()
if S[2] == S[3] and S[4] == S[5]:
  print("Yes")
else:
  print("No")
N, M = list(map(int, input().split()))
tmp=0

for i in range(M-N):
  k = i + N
  if M % k == 0:
    print(int(M/k))
    tmp=1
    break

if tmp==1:
else:
  print(1)

### FIXED CODE ###

N, M = list(map(int, input().split()))
tmp=0

if N==1:
  print(M)
  tmp=1
else:
  for i in range(int(M**0.8)+1):
    k = i + N
    if M % k == 0:
      print(int(M/k))
      tmp=1
      break

if tmp==0:
  print(1)
n=int(input())
A=list(map(int,input().split()))

ans = 1
for i in range(n):
    ans=ans*a[i]
    
if ans<= 10**18:
    print(ans)
    
else:
    print(-1)


### FIXED CODE ###

n = int(input())
A = list(map(int,input().split()))
A.sort()
if A[0]==0:
    print(0)
    exit()

ans = 1
for i in A:
    ans*=i
    if ans>1e18:
        print(-1)
        exit()

print(ans)
n=int(input())
a=list(map(int,input().split()))
an = [0]*(max(a)+1)
for i in a:
  an[i-1]+=1
  an[i-2]+=1
  an[i]+=1
print(max(an))

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
an = [0]*(max(a)+2)
for i in a:
  if i!=0:
    an[i-1]+=1
  an[i+1]+=1
  an[i]+=1
print(max(an))
from collections import deque
n, m = map(int, input().split())
ab = [[] for i in range(n+1)]

for i in range(m):
  a, b = map(int,input().split())
  ab[a].append(b)
  ab[b].append(a)

ans = [-1]*(n+1)
que = deque([1])

while que:
  q = que.popleft()
  for i in ab[q]:
    if ans[i] == -1:
      que.append(i)
      ans[i] = q

print("Yes")

for i range(1,n+1):
  print(ans[i])

### FIXED CODE ###

from collections import deque
n, m = map(int, input().split())
ab = [[] for i in range(n+1)]

for i in range(m):
    a, b = map(int, input().split())
    ab[a].append(b)
    ab[b].append(a)

ans = [-1]*(n+1)
que = deque([1])

while que:
    q = que.popleft()
    for i in ab[q]:
        if ans[i] == -1:
            que.append(i)
            ans[i] = q

print("Yes")

for i in range(2,n+1):
    print(ans[i])
import numpy as np
N, K = map(int, input().split(' '))
h = np.array([-1] + list(map(int, input().split(' '))), dtype=np.int64)

dp = np.array([-1 for _ in range(N+1)], dtype=np.int64)
# dp[0], dp[1], ..., dp[N] が用意される

dp[1] = 0
for k in range(2, N+1): # k = 2, ..., N
  """
  candidate = []
  for i in range(1, K+1): # i = 1, 2, ..., K
    if k - i <= 0:
      break
    candidate.append(dp[k-i] + abs(h[k] - h[k-i]))
  """
  start_index = max(1, k - K + 1)
  # candidate = [
  #     dp[start_index] + abs(h[k] - h[start_index]),
  #     dp[start_index+1] + abs(h[k] - h[start_index+1]),
  #     ...,
  #     dp[k-1] + abs(h[k] - h[k-1]),
  # ]
  candidate = dp[start_index:k] + np.abs(h[k] - h[start_index:k])
  dp[k] = np.minimum(candidate)

print(dp[N])


### FIXED CODE ###

N, K = map(int, input().split(' '))
h = [None] + list(map(int, input().split(' ')))

dp = [None for _ in range(N+1)]
# dp[0], dp[1], ..., dp[N] が用意される

dp[1] = 0
for k in range(2, N+1): # k = 2, ..., N
  candidate = []
  for i in range(1, K+1): # i = 1, 2, ..., K
    if k - i <= 0:
      break
    candidate.append(dp[k-i] + abs(h[k] - h[k-i]))
  dp[k] = min(candidate)

print(dp[N])
n, k = map(input().split())
s = (input())

if s[k] is 'A':
	s[k] = 'a'
elif s[k] is 'B':
	s[k] = 'b'
elif s[k] is 'C':
	s[k] = 'c'

print(s)


### FIXED CODE ###

n, k = map(int, input().split())

s = (input())

if s[k-1] is 'A':
	o = s[:k-1] + 'a' +s[k:] 
elif s[k-1] is 'B':
	o = s[:k-1] + 'b' +s[k:] 
elif s[k-1] is 'C':
	o = s[:k-1] + 'c' +s[k:] 

print(o)
d=[0]*13
d[0]=1
mul=1
for c in reversed(input()):
    e=[0]*13
    if c=="?":
        for i in range(10):
            for j in range(13):
                e[(i*mul+j)%13]+=d[j]
                e[(i*mul+j)%13]%=(10**9+7)
    else:
        for j in range(13):
            e[(i*mul+j)%13]+=d[j]
            e[(i*mul+j)%13]%=(10**9+7)
    d=e
    mul*=10
print(d[5])


### FIXED CODE ###

# coding: utf-8
# Your code here!
 
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline #文字列入力のときは注意
 
s = input()
l = len(s)
MOD = 10**9+7
 
dp = [0]*13
dp[0] = 1
for i in s:
    new = [0]*13
    if i == "?":
        for i in range(10):
            for j in range(13):
                new[(10*j+i)%13] += dp[j]
    else:
        i = int(i)
        for j in range(13):
            new[(i+10*j)%13] += dp[j]
    
    for i in range(13):
        new[i] %= MOD
    dp,new = new,dp
#    print(dp)
 
print(dp[5]%MOD)
def fun(x):
    x = int(input())
    if x==0:
        return 1
    else:
        return 0

print(fun(x))

### FIXED CODE ###

x = int(input())
if x==0:
    print(1)
else:
    print(0)
import copy

n = int(input())
t_li = list(map(int, input().split()))
m = int(input())
px_li = []
result = []

for i in range(m):
  p, x = map(int, input().split())
  px_li.append([p, x])

for j in range(m):
  c_li = copy.copy(t_li)
  c_li[j] = px_li[j][1]
  result.append(str(sum(c_li)))

string = "\n".join(result)
print(string)


### FIXED CODE ###

import copy

n = int(input())
t_li = list(map(int, input().split()))
m = int(input())
px_li = []
result = []

for i in range(m):
  p, x = map(int, input().split())
  px_li.append([p, x])

for j in range(m):
  c_li = copy.copy(t_li)
  c_li[px_li[j][0] - 1] = px_li[j][1]
  result.append(str(sum(c_li)))

string = "\n".join(result)
print(string)
N=int(input())
A=list(map(int, input().split()))
B=A[:]
i=0
while i < N:
    if A[i] % 2 == 0:
        A[i] = A[i]//2
        if i == N - 1:
            B = A[:]
            i = -1
        i += 1
    else:
        break
print(B)


### FIXED CODE ###

L = input()
n=0
for i in range(len(L)):
    if int(L[i]) ==1:
        n += 1
print(n)
import numpy as np
v=np.array(list(map(int, input().split())) )
mod = 10**9 +7
import math
def cmb(n, r,mod):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n
    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result = (result*int(numerator[k]))%mod

    return result
  
A = np.array([[2,1],[1,2]])
inv_A = np.linalg.inv(A)

k = np.dot(inv_A,v)

if abs(round(k[0]+ k[1])-(k[0]+k[1]))<10**(-10) and k[0]* k[1] >=0:
  print(cmb(round(k[0]+k[1]),round(k[0]),mod))
else:
  print(0)

### FIXED CODE ###

import numpy as np
v=np.array(list(map(int, input().split())) )
mod = 10**9 +7
import math
def cmb(n, r,mod):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n
    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result = (result*int(numerator[k]))%mod

    return result
  
A = np.array([[2,1],[1,2]])
inv_A = np.linalg.inv(A)

k = np.dot(inv_A,v)

if abs(round(k[0])-k[0])<10**(-10) and abs(round(k[1])-k[1])<10**(-10) and k[0]* k[1] >=0:
  print(int(cmb(int(round(k[0]+k[1])),int(round(k[0])),mod)))
else:
  print(0)
# coding:utf-8

INF = float('inf')


def inpl(): return list(map(int, input().split()))


x1, y1, x2, y2 = inpl()

diff_y = y2 - y1
diff_x = x2 - x1
ans1 = [x2 - diff_y, y2 + diff_x]
ans2 = [ans1[0] - diff_x, ans1[1] - diff_y]
ans = ans1 + ans2
print(' '.join(map(str, ans))

### FIXED CODE ###

# coding:utf-8

INF = float('inf')


def inpl(): return list(map(int, input().split()))


x1, y1, x2, y2 = inpl()

diff_y = y2 - y1
diff_x = x2 - x1
ans1 = [x2 - diff_y, y2 + diff_x]
ans2 = [ans1[0] - diff_x, ans1[1] - diff_y]
ans = ans1 + ans2
ans = ' '.join(map(str, ans))
print(ans)
a, b, k = (int(x) for x in input().split())
if a > b:
    c = b
    b = a
    a = c
l = [1]
for i in range(2, int(b/2)+1):
    if a % i == 0 and b % i == 0: l.append(i)
print(l[-k])


### FIXED CODE ###

a, b, k = (int(x) for x in input().split())
l = [i for i in range(1, min(a, b)+1) if a % i == 0 and b % i == 0]
print(l[-k])
def calc(a):
    y = 0
    for xx in x:
        y += (a - xx) ** 2
    return y


n = int(input())
x = [int(i) for i in input().split()]
left = min(x)
right = max(x)
while (right - left > 1):
    l = calc(left)
    r = calc(right)
    if (l < r):
        right = (right + left) // 2
    else:
        left = (right + left) // 2
print(min(r, l))

### FIXED CODE ###

def calc(a):
    y = 0
    for xx in x:
        y += (a - xx) ** 2
    return y


n = int(input())
x = [int(i) for i in input().split()]
left = min(x)
right = max(x)
while (right - left > 1):
    l = calc(left)
    r = calc(right)
    if (l < r):
        right = (right + left) // 2
    else:
        left = (right + left) // 2
print(min(calc(left), calc(right)))
def LI(): return list(map(int, input().split()))


A,B,C = LI()
max_value = max([A+10+b+C,A+B*10+C,A+B+C*10])

print(max_value)

### FIXED CODE ###

def LI(): return list(map(str, input().split()))


A = LI()

A.sort(reverse=True)
print(int(A[0] +A[1]) +int(A[2]))