Harryxun/stf_run huggingface dataset:
a = [int(i) for i in intput().split()]
" ".join(map(str,a.sort()))

### FIXED CODE ###

a = [int(i) for i in input().split()]
a.sort()
print(a[0],a[1],a[2])
import itertools
n = int(input())
plis = list(map(int, input().split()))
qlis = list(map(int, input().split()))
lis = list(itertools.permutations(range(1, n+1)))
n = 1
for i in lis:
    if list(i) == plis:
        a = n
        n += 1
    elif list(i) == qlis:
        b = n
        n += 1
    else:
        n += 1
print(abs(a-b))

### FIXED CODE ###

import itertools
n = int(input())
plis = list(map(int, input().split()))
qlis = list(map(int, input().split()))
lis = list(itertools.permutations(range(1, n+1)))
n = 1
for i in lis:
    if list(i) == plis:
        a = n
    if list(i) == qlis:
        b = n
    n += 1
print(abs(a-b))
import bisect
import copy
H, W, K = map(int, input().split())
c = [list(input()) for _ in range(H)]

ilst = []
index = 1
for i in range(H):
    for j in range(W):
        if c[i][j] == '#':
            c[i][j] = index
            index += 1
            ilst.append([i, j])

nlst = []
for i in range(K - 1):
    if ilst[i][0] == ilst[i + 1][0]:
        cindex = 0
        if c[ilst[i][0]][0] != '.':
            cindex = ilst[i][1]

        for j in range(cindex, ilst[i + 1][1]):
            c[ilst[i][0]][j] = i + 1
        for j in range(ilst[i + 1][1], W):
            c[ilst[i + 1][0]][j] = i + 2
    else:
        if c[ilst[i][0]][0] == '.':
            for j in range(W):
                c[ilst[i][0]][j] = i + 1
    if c[ilst[i][0]] != '.':
        if nlst == []:
            nlst.append(ilst[i][0])
        elif nlst[-1] != ilst[i][0]:
            nlst.append(ilst[i][0])

for i in range(H):
    if c[i][0] == '.':
        copyi = bisect.bisect_left(nlst, i)
        if copyi <= len(nlst) - 1:
            c[i] = copy.copy(c[nlst[copyi]])
        else:
            c[i] = copy.copy(c[nlst[copyi - 1]])

for i in range(H):
    for j in range(W):
        if j != W - 1:
            print(c[i][j], end=' ')
        else:
            print(c[i][j])

### FIXED CODE ###

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

index = 0
for i in range(H):
    cnt = 0
    for j in range(W):
        if c[i][j] == '#':
            index += 1
            cnt = index
            c[i][j] = cnt
        if c[i][j] == '.' and cnt != 0:
            c[i][j] = cnt

for i in range(H):
    for j in reversed(range(W - 1)):
        if c[i][j] == '.':
            c[i][j] = c[i][j + 1]

for i in range(H - 1):
    for j in range(W):
        if c[i][j] != '.' and c[i + 1][j] == '.':
            c[i + 1][j] = c[i][j]

for i in reversed(range(1, H)):
    for j in range(W):
        if c[i][j] != '.' and c[i - 1][j] == '.':
            c[i - 1][j] = c[i][j]


for i in range(H):
    for j in range(W):
        if j != W - 1:
            print(c[i][j], end=' ')
        else:
            print(c[i][j])
n=int(input())
a=list(map(int,input().split()))

for i in range(1,n+1):
    caca=int(a[i-1])
    lis[caca-1]=i

print(' '.join(map(str, lis)))

### FIXED CODE ###

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

lis=[0]*n

for i in range(1,n+1):
    caca=int(a[i-1])
    lis[caca-1]=i

print(' '.join(map(str, lis)))
n, x = map(int, input().split())
l = list(map(int, input().split()))

ans = 0
d = 0
while(d <= x):
    d = d + l[ans]
    ans += 1
print(ans)

### FIXED CODE ###

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

ans = 0
d = 0
while(d <= x):
    if ans == n:
        ans += 1
        break
    d = d + l[ans]
    ans += 1
print(ans)
a=str(input())
list=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]
if list(a)=False:
  print("A")
else:
  print("a")


### FIXED CODE ###

a = input()
print('a' if a.islower() else 'A')
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)

vote = sum(a)

if a[m-1] => vote*1/(4*m):
  print('Yes')
else:
  print('No')


### FIXED CODE ###

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

a.sort(reverse=True)

vote = sum(a)

if a[m-1] >= vote*1/(4*m):
  print('Yes')
else:
  print('No')
a=list()
while True:
  a.append(input())


### FIXED CODE ###

c = 1
while True:
    n = int(input())
    if n == 0:
        break
    print ('Case {}: {}'.format(c, n))
    c += 1
N, K = map(int, input().split())
H = list(map(int, input().split()))

if K >= N:
    print(0)
else:
    H.sort(reverse=True)
    for i in range(0, K):
        H.pop(i)
    
    print(sum(H))

### FIXED CODE ###

import sys
input = sys.stdin.readline

N, K = map(int, input().split())
H = list(map(int, input().split()))

if K >= N:
    print(0)
else:
    H.sort(reverse=True)
    print(sum(H[K:]))
N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     a.apend(input())
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)


### FIXED CODE ###

N = int(input())
DX = list(int(i) for i in input().split())
A = []
for i in range(N):
     A.append(int(input())) 
ai =[]
ans = N + DX[1]
for i in range(N):
    for n in range(DX[0]):
        if n*A[i]+1 <= DX[0]:
            ai.append(n)
    ans += max(ai)
    ai = []
print(ans)
def next_array(array):#辞書式に次の配列を与える関数
	s = -1
	for x in array[::-1]:
		if x < M:
			break
		else:
			s -= 1
    #Mより小さい最後の項を取得
    
    if s >= -N:
    	array[s] += 1#その項を１増やす
    	if s < -1:
      		for i in range(s+1,0):#以降の項を全て同じ値に
      			array[i] = array[s]
        
	return array
 
def score(array, rules):#点数計算
	scr = 0
	for rule in rules:
    	if (array[rule[1]-1] - array[rule[0]-1] == rule[2]):
        	scr += rule[3]
    return scr
 
 
# input
N, M, Q = map(int, input().split())
rules = []
for i in range(Q):
    a, b, c, d = map(int, input().split())
    rules.append([a, b, c, d])
    
array　= [1] * N
max_scr = 0
 
while True:
	max_scr = max(max_scr, score(array,rules)) 
	if array[0] == M:#全探索完了
		break 
	array = next_array(array)#次の配列へ
    
print(max_scr)

### FIXED CODE ###

def next_array(array):#辞書式に次の配列を与える関数
  s = -1
  for x in array[::-1]:
    if x < M:
      break
    else:
      s -= 1
    #Mより小さい最後の項を取得
  
  if s >= -N:
    array[s] += 1#その項を１増やす
    if s < -1:
      for i in range(s+1,0):#以降の項を全て同じ値に
        array[i] = array[s]

  return array
 
def score(array, rules):#点数計算
  scr = 0
  for rule in rules:
    if (array[rule[1]-1] - array[rule[0]-1] == rule[2]):
      scr += rule[3]
      
  return scr
 
# input
N, M, Q = map(int, input().split())
rules = []
 
for i in range(Q):
  a, b, c, d = map(int, input().split())
  rules.append([a, b, c, d])
  
array = [1] * N
max_scr = 0
 
while True:
  max_scr = max(max_scr, score(array,rules)) 
  if array[0] == M:#全探索完了
    break 
  array = next_array(array)#次の配列へ
    
print(max_scr)
a=input()
b=input()
  
print('{0} {1}'.format(a*b,a**2+b**2))


### FIXED CODE ###

a,b=[int(x) for x in input().split()]
print(a*b,2*a+2*b)
a = list(map(int,input().split()))
b = list(1,3,5,7,8,10,12)
c = list(4,6,9,11)
d = list(2)
e = 0

if a[0] in b and a[1] in b:
  e += 1
elif a[0] in c and a[1] in c:
  e += 1

if e == 1:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a = list(map(int,input().split()))
b = [1,3,5,7,8,10,12]
c = [4,6,9,11]
d = [2]
e = 0

if a[0] in b and a[1] in b:
  e += 1
elif a[0] in c and a[1] in c:
  e += 1

if e == 1:
  print("Yes")
else:
  print("No")
li  = list(map(int,input().split(" ")))
s  = lcm(li[0],li[1])
for i in range(len(li)-2):
    s = lcm (s,li[i+2])
def f(m):
    r = 0
    for i  in li:
        r += m%i
    return r
print(f(s-1))

### FIXED CODE ###

input()
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def lcm(a, b):
	return a * b // gcd (a, b)
li  = list(map(int,input().split(" ")))
s  = lcm(li[0],li[1])
for i in range(len(li)-2):
    s = lcm (s,li[i+2])
def f(m):
    r = 0
    for i  in li:
        r += m%i
    return r
print(f(s-1))
import math

al = b-a+1
# cで割り切れる個数
x = int(b/c) -int((a-1)/c)
# dで割り切れる個数
y = int(b/d) -int((a-1)/d)
# cdの最小公倍数
lcm_xy = int(c*d/math.gcd(c,d))
# cdの最小公倍数で割り切れる個数
xy = int(b/lcm_xy) -int((a-1)/lcm_xy)
#print(x,y,xy,al)
print(al-(x+y-xy))

### FIXED CODE ###

def gcd(a,b):
  while b:
    a,b = b,a % b    
  return a

a,b,c,d = map(int,input().split())

a_c = (a-1)//c
a_d = (a-1)//d
a_cd = (a-1)//(c*d//gcd(c,d))

b_c = b//c
b_d = b//d
b_cd = b//(c*d//gcd(c,d))

bb = b - (b_c + b_d - b_cd) 
aa = (a-1) - (a_c + a_d - a_cd)

print(bb - aa)
def main():
    n,s=map(int,input().split())
    N=[i+1 for i in range(n)]
    list1=[]
    pattern=[]
    A=list(map(int,input().split()))

    ft=0  
    dict={}
    for i in range(n+1):
        dict[i]=[]
    for i in range(1,2**n):
        list2=[]
        for j in range(n):
            if (i >> j) &1 == 1:
                list2.append(N[j])
        pattern=[]
        for x in range(1,2**len(list2)):
            pt=[]
            for y in range(len(list2)):
                if (x>>y)&1==1:
                    pt.append(list2[y])
            pattern.append(pt)
    # print(pattern)

        for p in pattern:
            sum=0
            if p in dict[len(p)]:
                ft+=1
            else:
                for x in p:
                    sum+=A[x-1]
                if sum==s:
                    dict[len(p)].append(p)
                    ft+=1
                    ft=ft%998244353
    print(ft%998244353)

if __name__"__main__":
    main()


### FIXED CODE ###

import numpy as np
def main():
    n,s=map(int,input().split())
    A=list(map(int,input().split()))
    dp=np.array([0 for i in range(min(3001,s+1))])
    dp[0]=1
    for ai in A:
        tmp=dp[:-ai].copy()
        #print(tmp)
        dp*=2
        dp[ai:]+=tmp
        dp%=998244353
    print(dp[s])
    

if __name__=="__main__":
    main()
import sys

args = [int(input()) for i in range(6)]
#args = [29,20,7,35,120]
smallest = 10
i = 0
sum = 0
arg_num = 0

for tmp in args[:4]:
    if tmp % 10 < smallest:
        if tmp % 10 != 0:
            smallest = tmp % 10
            arg_num = i
    i+=1

print("smallest:" + str(arg_num))

for i in range(5):
    if i != arg_num:
        if args[i] % 10 != 0:
            args[i] = args[i] + (10 - args[i] % 10)
    print("args[" + str(i) + "]:" + str(args[i]))
    sum += args[i]

print(sum)


### FIXED CODE ###

import sys

args = [int(input()) for i in range(5)]
#args = [29,20,7,35,120]
smallest = 10
i = 0
sum = 0
arg_num = 0

for tmp in args[:4]:
    if tmp % 10 < smallest:
        if tmp % 10 != 0:
            smallest = tmp % 10
            arg_num = i
    i+=1

#print("smallest:" + str(arg_num))

for i in range(5):
    if i != arg_num:
        if args[i] % 10 != 0:
            args[i] = args[i] + (10 - args[i] % 10)
    #print("args[" + str(i) + "]:" + str(args[i]))
    sum += args[i]

print(sum)
x,a,c=map(int,input().split())
if abs(x-a)<=abs(x-b):
    print('A')
else:
    print('B')

### FIXED CODE ###

x,a,b=map(int,input().split())
if abs(x-a)<=abs(x-b):
    print('A')
else:
    print('B')
N=int(input())
S=input()
print('YNeos'[S[:N//2]!=S[-N//2:]::2])


### FIXED CODE ###

print(int(input())**2)
N = int(input())
if N==1:
  print('Hello World')
else:
  A,B = map(int, input().split())
  print(A+B)

### FIXED CODE ###

N = int(input())
if N==1:
  print('Hello World')
else:
  A,B = [int(input()) for _ in range(2)]
  print(A+B)
import sys

sys.setrecursionlimit(1000000)

max_comb = None
max_value = 0


def memorize(c, value, memo, a):
    global max_comb
    global max_value

    memo[c] = value

    # for answer
    if c[0] != c[1] and \
            c[0] in a and \
            c[1] in a and \
            max_value < memo[c]:
        max_value = memo[c]
        max_comb = c


def comb(a_i, a_j, memo, a):
    c = (a_i, a_j)
    # print(a_i, a_j)

    if c in memo:
        return memo[c]

    if a_j == 1:
        memorize(c, a_i, memo, a)
        return a_i

    if a_i == a_j or a_j == 0:
        memorize(c, 1, memo, a)
        return 1

    value = comb(a_i - 1, a_j, memo, a) + comb(a_i - 1, a_j - 1, memo, a)
    memorize(c, value, memo, a)
    return memo[c]


if __name__ == '__main__':
    n = int(input())
    a = list(map(int, input().split()))

    # n = 5
    # a = [6, 9, 4, 2, 11]

    # find 1st, 2nd
    # max_a, second_max_a = -1, -2
    # for a_i in a:
    #     if max_a < a_i:
    #         second_max_a = max_a
    #         max_a = a_i
    #     elif second_max_a < a_i:
    #         second_max_a = a_i

    max_a = max(a)
    memo = dict()

    for a_i in a:
        if max_a != a_i:
            comb(max_a, a_i, memo, a)
            # comb(max_a, second_max_a, memo, a)
    #
    # for i in range(n - 1):
    #     for j in range(i + 1, n):
    #         comb(a_sorted[i], a_sorted[j], memo, a)
    #
    #         # print("comb:", a_sorted[i], a_sorted[j])

    print(max_comb[0], max_comb[1])


### FIXED CODE ###

if __name__ == '__main__':
    n = int(input())
    a = list(map(int, input().split()))

    # n = 5
    # a = [6, 9, 4, 2, 11]

    max_a = max(a)
    max_half = max_a / 2

    best_a_j = a[0] if a[0] != max_a else a[1]
    min_d = max_half
    for a_j in a:
        if a_j == max_a:
            continue

        d = abs(a_j - max_half)
        if d < min_d:
            best_a_j = a_j
            min_d = d

    print(max_a, best_a_j)
a,b = map(int,input().split())

print(a*b (a*2)+(b*2))

### FIXED CODE ###

a,b = map(int,input().split())

print(a*b, a*2+b*2)
import numpy as np
N = int(input())
name_list = []
score_list = []
score_list_new = []
for i in range(N):
  name, score =  map(str,input().split())
  name_list.append(name)
  score_list.append(int(score))
index_name = np.argsort(name_list)
for i in range (len(score_list)):
  score_list_new.append(score_list[index_name[i]])
for i in range(len(index_name)):
  for j in range(i,len(index_name)):
  	if (name_list[i] == name_index[j]) and (score_list_new[i] < score_list_new[j]):
      index_name[i], index_name[j] = index_name[j], index_name[i]
    else:
      None  
for i in range(len(index_name)):
  print(index_name[i])

### FIXED CODE ###

import numpy as np
N = int(input())
restaurants_list = []
for i in range(N):
  name,score = map(str,input().split())
  score = int(score)
  restaurants_list.append([name,score,i+1])
restaurants_list.sort(key = lambda x:x[1],reverse=True) 
restaurants_list.sort(key = lambda x:x[0]) 
for i in range(N):
  print(restaurants_list[i][2])
print('Yes' if ''.join.sorted.input()=='abc' else 'No' )

### FIXED CODE ###

print('Yes' if ''.join(sorted(input()))=='abc' else 'No' )
s = str(input())
if "RRR" in s:
  print(3)
  elif "RR" in s:
    print(2)
    elif "SSS" in s:
      print(0)
      else:
        print(1)

### FIXED CODE ###

s = input()
if s == "RRR":
  print(3)
if s == "SSS":
  print(0)
if s == "RRS":
  print(2)
if s == "SRR":
  print(2)
if s == "RSS":
  print(1)
if s == "SRS":
  print(1)
if s == "SSR":
  print(1)
if s == "RSR":
  print(1)
import math
from fractions import gcd
a, b, c, d = [int(x) for x in inputs[0].split(' ')]
e = c * d // gcd(c, d) # lcm(c, d)

num_b = b - b // c - b // d + b // e
num_a = (a-1) - (a-1) // c - (a-1) // d + (a-1) // e

print(num_b - num_a)

### FIXED CODE ###

import sys
import math
from fractions import gcd
inputs = sys.stdin.readlines()
a, b, c, d = [int(x) for x in inputs[0].split(' ')]
e = c * d // gcd(c, d) # lcm(c, d)
 
num_b = b - b // c - b // d + b // e
num_a = (a-1) - (a-1) // c - (a-1) // d + (a-1) // e
 
print(num_b - num_a)
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]  # 親の値が更新され、更新された親の値が返る, 返るのは正の値

    def size(self, x):
        return -self.parents[self.find(x)]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if self.size(x) > self.size(y):
            x, y = y, x  # 処理を行う上で、必ずxのグループの要素数の方が多くあってほしい
        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def same(self, x, y):
        return self.find(x) == self.find(y)


N, M = map(int, input().split())
brige = []
for _ in range(M):
    a, b = map(lambda x: int(x)-1, input().split())
    brige.append((a, b))

uf = UnionFind(N)
ans = [int(N*(N-1)//2)]*M

for i in reversed(range(1, M)):
    if uf.same(brige[i][0], brige[i][1]):
        ans[i-1] = ans[i]
    else:
        ans[i-1] = ans[i] - uf.size(brige[i][0]) * uf.size(brige[i][1])
        uf.union(brige[i][0], brige[i][1])
for i in range(M):
    print(ans[i])


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)
 
class UnionFind():
	def __init__(self, size):
		self.table = [-1 for _ in range(size)]
		self.size = [1 for _ in range(size)]
 
	def find(self, x):
		if self.table[x] < 0:
			return x
		else:
			self.table[x] = self.find(self.table[x])
			return self.table[x]
 
	def union(self, x, y):
		s1 = self.find(x)
		s2 = self.find(y)
		if s1 != s2:
			if self.table[s1] > self.table[s2]:
				self.table[s2] = s1
				self.table[s1] -= 1
				self.size[s1] += self.size[s2]
				self.size[s2] = 0
			else:
				self.table[s1] = s2
				self.table[s2] -= 1
				self.size[s2] += self.size[s1]
				self.size[s1] = 0
 
		return
 
n, m = map(int, input().split())
brs = [list(map(int, input().split())) for _ in range(m)]
 
uf = UnionFind(n)
ans = [n*(n-1)//2]
for i in range(m-1, 0, -1):
	a, b = brs[i][0], brs[i][1]
	a, b = a-1, b-1
	s1, s2 = uf.find(a), uf.find(b)
	if s1 != s2:
		ans.append(ans[-1] - uf.size[s1]*uf.size[s2])
	else:
		ans.append(ans[-1])
	uf.union(s1, s2)
print(*list(reversed(ans)), sep="\n")
n=int(input())
a=[input() for i in range(n)]
 
tmp=""
for i in range(n//2):
    alpha=[0]*26
    for j in range(n):
        alpha[ord(a[i][j])-ord("a")]+=1
    for j in range(n):
        if alpha[ord(a[-1-i][j])-ord("a")]!=0:
            tmp+=a[-1-i][j]
            break
    else:
        print(-1)
        quit()
 
 
if n%2==1:
    tmp=tmp+a[n//2][0]+tmp[::-1]
else:
    tmp=tmp+tmp[::-1]
 
print(tmp)


### FIXED CODE ###

import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

a,b=map(int,input().split())
print(a*b)
n, l = map(int, input().split())
a = [input() for _ in range(n)]
a.sort()
print ("".join(a))

### FIXED CODE ###

a = list(map(int, input().split()))
a.sort()
if a[0] == 5 and a[1] == 5 and a[2] == 7:
	print ("YES")
else:
	print ("NO")
N = int(input())

if N%2==1:
    print(0)
else:
    i = 10
    count = 0
    while i <= N:
        count += N//i
        i = i*5

print(count)


### FIXED CODE ###

N = int(input())

if N%2==1:
    print(0)
else:
    i = 10
    count = 0
    while i <= N:
        count += N//i
        i = i*5

    print(count)
N = int(input())

nodes = []
edges = []

for i in range(N):
    nodes.append([])


for i in range(N-1):
    a, b = [int(v) for v in input().split()]
    a -= 1
    b -= 1

    nodes[a].append((b, i))
    nodes[b].append((a, i))

max_l = 0
max_i = 0
for i in range(N):
    l = len(nodes[i])
    if max_l < l:
        max_l = l
        max_i = i


def fill(nodes, links, e, p):
    c = 1
    if c == p:
        c += 1
    for n, i in links:
        if e[i] != 0:
            continue
        e[i] = c
        fill(nodes, nodes[n], e, c)

        c += 1
        if c == p:
            c += 1
    
e = [0] * (N - 1)
fill(nodes, nodes[max_i], e, 0)
print(max_l)

for i in e:
    print(i)

### FIXED CODE ###

N = int(input())

nodes = []
edge = []
for i in range(N):
    nodes.append([])

for i in range(N-1):
    a, b = [int(v) - 1 for v in input().split(' ')]
    if a >= len(nodes):
        exit()
    if b >= len(nodes):
        exit()
    nodes[a].append((b, i))
    nodes[b].append((a, i))
    edge.append(0)

max_l = 0
max_i = 0
if nodes is None:
    exit()

for i, links in enumerate(nodes):
    if links is None:
        exit()
    l = len(links)
    if max_l < l:
        max_l = l
        max_i = i

def fill(nodes, edge, queue):
    while len(queue) > 0:
        ni, pc = queue.pop(0)
        links = nodes[ni]

        c = 1
        if pc == c:
            c += 1

        if links is None:
            exit()

        next_links = []
        for n, i in links:
            if n < 0 or i < 0:
                exit()
            if n >= len(nodes) or i >= len(edge):
                exit()

            if edge[i] != 0:
                continue
            edge[i] = c
            queue.append((n, c))

            c += 1
            if pc == c:
                c += 1

queue = [(max_i, 0)]    
fill(nodes, edge, queue)

print(max_l)
for e in edge:
    print(e)
while True:
    x = input()
    if x == "0":
        break
    num = [int(i) for i in x.split("")]
    print(str(sum(num)))
     

### FIXED CODE ###

while True:
    x = input()
    if x == "0":
        break
    num = [int(i) for i in x]
    print(sum(num))
if S = "ABC"
print("ARC")
else
print("ABC")

### FIXED CODE ###

S = str(input())
if S == "ABC":
  print("ARC")
else:
  print("ABC")
X,Y,Z,K=map(int,input().split())
A=sorted(list(map(int,input().split())))[::-1]
B=sorted(list(map(int,input().split())))[::-1]
C=sorted(list(map(int,input().split())))[::-1]
ans=[0]*(K**3)
ind=0
for a in range(len(A)):
  for b in range(len(B)):
    for c in range(len(C)):
      if (a+1)*(b+1)*(c+1)>K:
        break
      ans[ind]=A[a]+B[b]+C[c]
      ind+=1

ans=sorted(ans)[::-1]
for i in range(min(K,len(ans))):
  print(ans[i])


### FIXED CODE ###

X,Y,Z,K=map(int,input().split())
A=sorted(list(map(int,input().split())))[::-1]
B=sorted(list(map(int,input().split())))[::-1]
C=sorted(list(map(int,input().split())))[::-1]
ans=[]
for a in range(len(A)):
  for b in range(len(B)):
    for c in range(len(C)):
      if (a+1)*(b+1)*(c+1)>K:
        break
      ans.append(A[a]+B[b]+C[c])

ans=sorted(ans)[::-1]
for i in range(min(K,len(ans))):
  print(ans[i])
import math
n = int(input())
ans = 0
for i in range(1, int(n**0.5)+1):
    n2 = n - i
    if n2 % i == 0:
        #print(n2+i , n/(n2/i), i)
        if abs(n/(n2/i) - i) < 0.8:
            ans += math.ceil(n2 / i)

print(ans)


### FIXED CODE ###

import math
n = int(input())
ans = 0



for i in range(1, int(n**0.5)+1):
    n2 = n - i

    if n2 % i == 0:
        #print(i, n2 / i)
        #print(n2+i , n//(n2//i), i)

        try:
            if n//(n2//i) == i:
                ans += math.ceil(n2 / i)
        except:
            pass

print(ans)
n=input()

a=list(map(bin(int),input(),split()))

b=map(rfind('1')-1,a)

print(min(b))

### FIXED CODE ###

import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))
n=int(input())
result=100000000000000000000000000
for i in range(n):
  nn=n/(i+1)
  if (nn.is_integer() and result>nn+i-1):
	result=nn+i-1
print(result)
    
    


### FIXED CODE ###

a,b=map(int,input().split())
if a>9 or b>9:
  print(-1)
else:
  print(a*b)
# -*- coding: utf-8 -*-
# モジュールのインポート
from scipy.special import comb

# 標準入力の取得
N, M = list(map(int, input().split()))

# 求解処理
result = comb(N, 2, exact=True) + comb(M, 2, exact=True)

# 結果出力
print(result)


### FIXED CODE ###

# -*- coding: utf-8 -*-
# 標準入力の取得
N, M = list(map(int, input().split()))

# 求解処理
result = int(N*(N-1)/2 + M*(M-1)/2)

# 結果出力
print(result)