Harryxun/stf_run huggingface dataset:
import math

def is_prime(q):
    if q == 2:
        return (True, 0)
    if q < 2:
        return (False, 1)
    if q&1 == 0:
        return (False, 2)

    i = 3
    end = int(math.sqrt(q))
    while i <= end:
        if q%i is 0:
            return (False, i)
        i += 2
    return (True, 0)

def split22(n, k):
	if n % k != 0:
		return None
	ml = int(n / k)
	ret = is_prime(ml)
	if ret[0] is True:
		return None
	return (int(n/2), int(ret[1]), int(ml/ret[1]))

def split13(n):
	# n = (3 - m) * l
	if n&1 == 0:
		l = n / 2
		if math.gcd(l, 2) == n:
			return (n, l, 2)
	# l^2 - 3l + n = 0
	tmp = 3**2 - 4 * n
	if tmp < 0:
		return None
	_x = math.sqrt(tmp)
	if _x - int(_x) == _x:
		x = (-1) * _x - b
		if x > 0:
			x = _x - b
		return (n, x, 3-x)
	return None

n = int(input())
ans = None

ans = split13(n)
k = 1
while ans is None:
	if n&1 == 0:
		ans = split22(n, k)
	n *= 2
	k *= 2

print(" ".join(map(str, ans)))


### FIXED CODE ###

n = int(input())
ans = None
for i in range(1, 3501, 1):
	for j in range(1, 3501, 1):
		dominator = 4 * i * j - n * (i + j)
		if dominator > 0:
			numerator = i * j * n
			if numerator % dominator == 0:
				ans = (i, j, int(numerator / dominator))
				break
	if ans is not None:
		break
print(" ".join(map(str, ans)))
N = int(input())
color = [0]*8
free = 0
for _ in range(N):
    a  = int(input())
    if 1<=a<=399:
        color[0] = 1
    elif 400<=a<=799:
        color += 1
    elif 800<=a<=1199:
        color += 1
    elif 1200<=a<=1599:
        color += 1
    elif 1600<=a<=1999:
        color += 1
    elif 2000<=a<=2399:
        color += 1
    elif 2400<=a<=2799:
        color += 1
    elif 2800<=a<=3199:
        color += 1
    else:
        free += 1
maxcolor = sum(color)+free
mincolor = sum(color)
print(mincolor,maxcolorx)

### FIXED CODE ###

N = int(input())
color = [0]*8
free = 0
A = list(map(int,input().split()))
for a in A:
    if 1<=a<=399:
        color[0] = 1
    elif 400<=a<=799:
        color[1] = 1
    elif 800<=a<=1199:
        color[2] = 1
    elif 1200<=a<=1599:
        color[3] = 1
    elif 1600<=a<=1999:
        color[4] = 1
    elif 2000<=a<=2399:
        color[5] = 1
    elif 2400<=a<=2799:
        color[6] = 1
    elif 2800<=a<=3199:
        color[7] = 1
    else:
        free += 1
maxcolor = sum(color)+free
mincolor = max(sum(color),1)
print(mincolor,maxcolor)
a=int(input())
b=int(input())
ans=a*b-a-b+1
print(ans)

### FIXED CODE ###

a,b=map(int,input().split())
ans=a*b-a-b+1
print(ans)
# import bisect
# from collections import Counter, deque
# import copy
# from fractions import gcd
# from functools import reduce
from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product
# import math
import numpy as np
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline

def resolve():
    N=int(input())
    l=[[0,0] for i in range(N)]
    for i in range(N):
        x,y=map(int,input().split())
        l[i][0],l[i][1]=x,y

    p=permutations(l)
    dist = 0
    for v in p:
        for i in range(N-1):
            dist+=np.sqrt((v[i][0]-v[i+1][0])**2+(v[i][1]-v[i+1][1])**2)
    print(dist/len(list(permutations((l)))))


resolve()

### FIXED CODE ###

# import bisect
# from collections import Counter, deque
# import copy
# from fractions import gcd
# from functools import reduce
from itertools import permutations

def resolve():
    N=int(input())
    l=[[0,0] for i in range(N)]
    for i in range(N):
        x,y=map(int,input().split())
        l[i][0],l[i][1]=x,y

    p=permutations(l)
    dist = 0
    for v in p:
        for i in range(N-1):
            dist+=((v[i][0]-v[i+1][0])**2+(v[i][1]-v[i+1][1])**2)**0.5

    print(dist/len(list(permutations((l)))))


resolve()
N = int(input())
A = list(map(int,list(input().split())))
Q = int(input())
num_list = [0]*(N+1)
s = []
for i in range(N):
    num_list[A[i]] += 1
for _ in range(Q):
    s_s = 0
    B,C = map(int,(input().split()))
    num_list[C] += num_list[B]
    num_list[B] = 0
    for j in range(N+1):
        s_s += (j)*num_list[j]
    s.append(s_s)
for i in range(Q):
    print(s[i])

### FIXED CODE ###

import sys,collections
input = sys.stdin.readline

N=input().rstrip()
A=list(map(int,input().split()))
Ac = collections.Counter(A)
Q = int(input())
for i in range(Q):
    B,C = list(map(int,input().split()))
    nb = Ac[B]
    Ac[C] += Ac[B]
    Ac[B] = 0

    if i==0:
        ans = 0
        for key,val in Ac.items():
            ans += key*val
    else:
        ans +=nb*C - nb*B
    
    print(ans)
#16D8101023J 久保田凌弥 kubotarouxxx python3

x=int(input())
y=int(input())

w=x*y
z=x*2+y*2

print(w,z)



### FIXED CODE ###

#16D8101023J 久保田凌弥 kubotarouxxx python3

x,y=map(int, input().split())
w=x*y
z=2*x+2*y

print(w,z)

#
N, M = map(int, input().split())
list = [list(map(int, input().split())) for _ in range(M)]
ans = ["0"]*M

for i in range(M):
    for  j in range(M):
            if list[i] == [1, 0] and list[i] != list[j] :
                print(-1)
                exit() #答えが0以外で先頭の数字が0になる場合 
            elif list[i][0] == list[j][0] and list[i][1] != list[j][1]:
                print(-1)
                exit() #ある桁の数字が異なる場合
            elif list[i] == [1, 0] and N != 1:
                print(-1)
                exit() #Nが1でないのに答えが0になる場合

for i in range(M):
    for j in range(M):
        if list[i][0] == j+1 :
            ans[j] = str(list[i][1])

print(int("".join(ans)))


### FIXED CODE ###

n,m=map(int,input().split())
sc=[list(map(int,input().split())) for i in range(m)]

for i in range(10**n): #n桁の数字の全パターン
  number =str(i)
  if len(number)==n and all([number[s-1]==str(c) for s,c in sc]):
      print(number) #all すべての要素がTrueならTrue
      exit()
print(-1)
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N, X = MAP()

if N%2 == 1:
    print((N-1)*3)
else:
    raise Exception
    print(N*3//2+abs(X-N//2)*3)


### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys
if sys.version_info.minor >= 5: from math import gcd
else: from fractions import gcd

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N, X = MAP()

print((N-gcd(N, X))*3)
N=int(input())
a=input().split()
A=[int(b) for b in a]
first=A[0]
last=A[-1]
if N==2:
    print(abs(first-last))
else:
    average = sum(A) // 2
    number = 0
    del A[0]
    del A[-1]
    for a in range(N - 1):
        number += A[a]
        if number >= average:
            break
    a1 = abs(sum(A[:a]) + first - last - sum(A[a:]))
    a2 = abs(sum(A[:a + 1]) + first - last - sum(A[a + 1:]))
    print(min(a1, a2))


### FIXED CODE ###

N=int(input())
a=input().split()
a=[int(b) for b in a]
numbers=[]
number=0
for a_ in a:
    number+=a_
    numbers.append(number)
del numbers[-1]
if N==2:
    print(abs(a[0]-a[1]))
else:
    whole=sum(a)
    answers=[]
    for number in numbers:
        answer=abs(number*2-whole)
        answers.append(answer)
    print(min(answers))
S = list(input())

if S[2]==S[3]:
	if S[4] == S[5]:
    	print('Yes')
	else:
      print('No')
else:
  print('No')
  




### FIXED CODE ###

S= list(input())
 
if S[2]==S[3]:
    if S[4] == S[5]:
        print('Yes')
    else:
        print('No')
else:
  print('No')
N = int(input())
money = []
type = []
for i in range(N):
    m, t = input().split()
    money.append(int(m))
    type.append(t)
    
sum = 0
for i in range(N):
    if type[i] == 'JPY':
        sum += money[i]
    else :
        sum += money[i]*3.8*10**5
print(sum)

### FIXED CODE ###

N = int(input())
money = []
type = []
for i in range(N):
    m, t = input().split()
    money.append(float(m))
    type.append(t)
    
sum = 0
for i in range(N):
    if type[i] == 'JPY':
        sum += money[i]
    else :
        sum += money[i]*3.8*10**5
print(sum)
import sys
input = sys.stdin.readline
N, Q = map(int, input().split())

S = [None] * N
T = [None] * N
X = [None] * N
for i in range(N):
    S[i], T[i], X[i] = map(int, input().split())

D = [None] * Q
for i in range(Q):
    D[i] = int(input())
N, Q = map(int, input().split())

S = [None] * N
T = [None] * N
X = [None] * N
for i in range(N):
    S[i], T[i], X[i] = map(int, input().split())

D = [None] * Q
for i in range(Q):
    D[i] = int(input())
# X S T
roadworks = [(x, s, t) for x, s, t in zip(X, S, T)]
roadworks = sorted(roadworks, reverse=True)
#print(roadworks)

from collections import defaultdict
stops = defaultdict(lambda: -1)
for x, s, t in roadworks:
    for i in range(s, t+1):
        i = max(0, i-x)
        stops[i] = x
#print(stops)
for d in D:
    print(stops[d+1])

### FIXED CODE ###

import sys
input = sys.stdin.readline
N, Q = map(int, input().split())

S = [None] * N
T = [None] * N
X = [None] * N
for i in range(N):
    S[i], T[i], X[i] = map(int, input().split())

D = [None] * Q
for i in range(Q):
    D[i] = int(input())
    
# X S T
roadworks = [(x, s, t) for x, s, t in zip(X, S, T)]
roadworks = sorted(roadworks, key=lambda x: x[0])
#print(roadworks)

# Dは入力時点でソート済み
walkers = D[:]
ans = [-1] * Q
skip = [-1] * Q

import bisect
for x, s, t in roadworks:
    left = bisect.bisect_left(walkers, s - x)
    right = bisect.bisect_left(walkers, t - x)
    
    i = left
    while i < right:
        if skip[i] == -1:
            ans[i] = x
            skip[i] = right
            i += 1
        else:
            i = skip[i]

    
#print(walkers)
for a in ans:
    print(a)
d=int(input())
t=int(input())
s=int(input())

if d == 0:
    print ('error')
    
elif t == 0:
    print ('error')
        
elif s == 0:
    print ('error')

else:
    
    if (s*t) >= d :
        print ('Yes')
    
    else:
        print ('No')

### FIXED CODE ###

import sys

def main():
    input = sys.stdin.read()
    data = list(map(int, input.split()))

    a, b, c = data

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



if __name__ == '__main__':
    main()
N = int(input())
ans = [0] * 31
if N == 0:
    print(0)
    exit()
else:
    while N != 0:
        i = 1 if N < 0 else 0
        k = pow(-2, i)
        while abs(N) > abs(k):
            i += 2
            k += pow(-2, i)
        ans[i] = 1
        N -= pow(-2, i)

for j in range(30, -1, -1):
    if ans[j] == 1:
        print(''.join(map(str, reversed(ans[:j + 1]))))
        exit()


### FIXED CODE ###

N = int(input())
ans = [0] * 40
if N == 0:
    print(0)
    exit()
else:
    while N != 0:
        i = 1 if N < 0 else 0
        k = pow(-2, i)
        while abs(N) > abs(k):
            i += 2
            k += pow(-2, i)
        ans[i] = 1
        N -= pow(-2, i)

for j in range(39, -1, -1):
    if ans[j] == 1:
        print(''.join(map(str, reversed(ans[:j + 1]))))
        exit()
x,y,z=map(int,imput().split())
print(z,x,y)


### FIXED CODE ###

x,y,z=map(int,input().split())
print(z,x,y)
n, m = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
for i in a:
    i.pop(0)
for i in range(n-1):
    a[i+1] = set(a[i]) & set(a[i+1])
print(len(a[n-1]))
salmo

### FIXED CODE ###

N, M = map(int, input().split())
c = [0] * M
for i in range(N):
    a = [int(i) for i in input().split()]

    for j in a[1:]:
        c[j-1] += 1
 
print(c.count(N))
h, w = map(int,input().split())
n = int(input())
a = list(map(int,input().split()))
grid = [[' ']*w for i in range(h)]

ci = 0
for i in range(h):
    for j in range(w):
        if not a[ci]: ci+= 1
        if i%2==0: grid[i][j] = ci+1
        else: grid[i][~j] = ci+1
        a[ci]-= 1
for row in grid: print(*row)

### FIXED CODE ###

# one -> four
# two -> two, four
# four -> one, two, four

n = int(input())
one = 0
two = 0
four = 0

for a in map(int,input().split()):
    if a%2 != 0: one+= 1
    elif a%4 != 0: two+= 1
    else: four+= 1

def no():
    print("No")
    exit()

if two == 0:
    #1414141
    print("Yes" if four >= one-1 else "No")
else:
    #222222241414141
    print("Yes" if four >= one else "No")
import numpy as np


MOD = 10**9 + 7

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

if (X + Y) % 3 != 0:
    print(0)

    if (Y < X/2) or (Y > 2*X):
        print(0)
	else:
      
        h = (2 * X - Y) // 3
        v = (2 * Y - X) // 3

        def extgcd(a, b):
            if b == 0:
                x = 1
                y = 0
            else:
                y, x = extgcd(b, a%b)
                y -= a//b * x
            return x, y

        def low_inverse(a):
            ret, _ = extgcd(a, MOD)
            return ret

        def low_combination(m, n):
            # calculate (m+n)!/n!m!
            ret = 1
            numerator = m + n
            for i in range(min(m, n)):
                inv_i = low_inverse(i + 1)
                ret = ret * (numerator - i) * inv_i % MOD
            return ret

        print(low_combination(h, v))


### FIXED CODE ###

import numpy as np


MOD = 10**9 + 7

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

if (X + Y) % 3 != 0:
    print(0)

else:
    if (Y < X/2) or (Y > 2*X):
        print(0)
    
    else:
      
        h = (2 * X - Y) // 3
        v = (2 * Y - X) // 3

        def extgcd(a, b):
            if b == 0:
                x = 1
                y = 0
            else:
                y, x = extgcd(b, a%b)
                y -= a//b * x
            return x, y

        def low_inverse(a):
            ret, _ = extgcd(a, MOD)
            return ret

        def low_combination(m, n):
            # calculate (m+n)!/n!m!
            ret = 1
            numerator = m + n
            for i in range(min(m, n)):
                inv_i = low_inverse(i + 1)
                ret = ret * (numerator - i) * inv_i % MOD
            return ret

        print(low_combination(h, v))
import math
n = int(input())
a = list(map(int, input().split()))

ans = 1
gcd_num = a[0]
# 1つ使わない中で最大公約数が最大のものを求める
for i in range(0, n):
    if i == 0:
        gcd_num = a[1]
    else:
        gcd_num = a[0]
    for j in range(0, n):
        if i == j:
            continue
        gcd_num = math.gcd(gcd_num, a[j])
    ans = max(ans, gcd_num)
print(ans)

### FIXED CODE ###

import fractions
n = int(input())
a = [0] + list(map(int, input().split())) + [0]

# 前処理。left, rightでそれぞれ累積gcdを作っておく
left = [0] * (n + 2)
right = [0] * (n + 2)

for i in range(n):
    left[i] = fractions.gcd(left[i - 1], a[i])

for i in range(n, 0, -1):
    right[i] = fractions.gcd(right[i + 1], a[i])

for i in range(1, n):
    right[-i - 1] = fractions.gcd(right[-i], a[-i - 1])

ans = 1
for i in range(1, n + 1):
    ans = max(ans, fractions.gcd(left[i - 1], right[i + 1]))
print(ans)
N,Y=map(int, input().split())
count=0

for i in range(N+1):
    if count==0:
        pass
    else:
        break
    for j in range(N-i+1):
        if count==0:
            pass
        else:
            break
        for k in range(N-i-j+1):
            if 10000*i+5000*j+1000*k==Y:
                print(f'{i}{j}{k}')
                count+=1
            else:
                pass
if count==0:
    print('{}{}{}'.format(-1,-1,-1))
else:
    pass

### FIXED CODE ###

N,Y=map(int, input().split())
count=0

for i in range(N+1):
    if count==0:
        pass
    else:
        break
    for j in range(N-i+1):
        if 10000*i+5000*j+1000*(N-i-j)==Y:
            print(i,j,N-i-j)
            count+=1
            break
        else:
            pass
if count==0:
    print(-1,-1,-1)
else:
    pass
import math H,A = [int(c) for c in input().spit()] print(math.ceil(A/B))

### FIXED CODE ###

import math

H, A = [int(x) for x in input().split()]
print(math.ceil(H/A))
N=int(input())
D={}
for i in range(N):
    D=[input().split()]
    for w in range(2):
        D[i][w]=int(D[i][w])

cou=0
for i in range(N):
    if D[i][0]==D[i][1]:
        cou+=1
    else:
        cou=0
    
    if cou == 3:
        print('Yes')
        break

if cou == 0:
    print('No')
    

### FIXED CODE ###

N=int(input())
D={}
for i in range(N):
    D[i]=input().split()

cou=0
for i in range(N):
    if D[i][0]==D[i][1]:
        cou+=1
        if cou ==3:
            print('Yes')
            break
    else:
        cou=0

if cou < 3:
    print('No')
n,q=map(int,input().split())
d = {}
ans = [0]*(n+1)
for i in range(n-1):
    sta,gol = map(int,input().split())
    if sta not in d:
        d[sta] = set() 
    d[sta].add(gol)

dv = {}
for i in range(q):
    sta,val = map(int,input().split())
    if sta not in dv:
        dv[sta] = val 
    else:
        dv[sta]+=val
    

#print(d)
#print(dv)  

checked = set()

def cal_(ans_,sta_,flow,checked_):
    val_ = flow
    checked_.add(sta_)
    if sta_ in dv:
        val_ +=dv[sta_]
    
    ans_[sta_]+=val_
    
    if sta_ in d:
        targetset = d[sta_]
        for t in targetset:
            if t not in checked_:
                ans_=cal_(ans_,t,val_,checked_)
    return ans_

ans = cal_(ans,1,0,checked)

anss = ""
for i in range(n):
    anss = anss+str(ans[i+1])+" "
print(anss)

### FIXED CODE ###

n,q=map(int,input().split())
d = {}
ans = [0]*(n+1)
for i in range(n-1):
    sta,gol = map(int,input().split())
    d[gol] = sta

for i in range(q):
    sta,val = map(int,input().split())
    ans[sta]+=val
    

for i in range(n):
    gol = i+1
    if gol in d:
        ans[gol]+=ans[d[gol]]
    

for i in range(n):
    print(ans[i+1], " ",end="")
import numpy as np
h, w = map(int, input().split())
colors = np.zeros((h,w))
for i in range(h):
    s = input()
    for j,c in enumerate(s):
        if c=='#':
            colors[i,j] = 1

def tonari(pos):
    i,j = pos
    ans = []
    if i==0:
        ans.append((i+1,j))
    elif i==h-1:
        ans.append((i-1,j))
    else:
        ans.append((i-1,j))
        ans.append((i+1,j))
    if j==0:
        ans.append((i,j+1))
    elif j==w-1:
        ans.append((i,j-1))
    else:
        ans.append((i,j-1))
        ans.append((i,j+1))
    
    return ans

# 深さ優先探索をする
# マス(0,0)からスタート
# 次の仕切り直しで使うスタート位置のリストnext_start
# すでに訪ねたかどうかを表すh*wの表 visited=1 
# current_positionの前後左右を見てもしcurrent_colorと異なればそっちに動く

current_position = (0,0)
current_color = colors[current_position]
current_group = 0
groups = {0:[1-current_color, current_color]} # {group_num:(white_num,black_num)}
next_visit = []
other_group = []

unvisited = [(i,j) for i in range(h) for j in range(w)]
unvisited.remove((0,0))

while True:
    # current_positionの前後左右を見る
    # print(current_position)
    neighbors = tonari(current_position)
    for ngb in neighbors:
        if colors[ngb] != current_color and ngb in unvisited and ngb not in next_visit:
            next_visit.append(ngb)
        # もしnon_visitedかつcurrent_colorと異なればnext_visitに追加
        # それ以外は何もしない

    # next_visitが空でないとき
    if len(next_visit) > 0:
        current_position = next_visit.pop(0)
        current_color = colors[current_position]
        groups[current_group][0] += 1-current_color
        groups[current_group][1] += current_color
        unvisited.remove(current_position)
        # next_visitの中から次の移動先を取り出して
        # colorをみてgroupに追加
        # current_positionとcurrent_colorを更新

    elif len(next_visit) == 0:
        # next_visitが空のとき
        if len(unvisited) == 0:
            break
        else:
            current_position = unvisited.pop(0)
            current_color = colors[current_position]
            current_group += 1
            groups[current_group] = [1-current_color, current_color]
            # unvisitedの中から一つ選んで
            # current_position, color更新
            # current_group更新

# print(groups)
ans = 0
for g in groups:
    black, white = groups[g]
    ans += black*white
print(int(ans))

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

h,w=map(int,input().split())
s=[input() for _ in range(h)]
t=[[None]*w for _ in range(h)]

def dfs(i,j,color):

  if not (0<=i<h and 0<=j<w):return 0,0
  if s[i][j]==color: return 0,0
  if t[i][j]:return 0,0

  t[i][j]=True
  wh,bl=0,0
  if s[i][j]=="#":
    bl+=1
  else:
    wh+=1

  tmp1,tmp2=dfs(i+1,j,s[i][j])
  wh,bl=wh+tmp1,bl+tmp2

  tmp1,tmp2=dfs(i-1,j,s[i][j])
  wh,bl=wh+tmp1,bl+tmp2
        
  tmp1,tmp2=dfs(i,j-1,s[i][j])
  wh,bl=wh+tmp1,bl+tmp2

  tmp1,tmp2=dfs(i,j+1,s[i][j])
  wh,bl=wh+tmp1,bl+tmp2

  return wh,bl

ans=0
for i in range(h):
  for j in range(w):
    a,b=dfs(i,j,"!")
    ans+=a*b

print(ans)
import math

divisor=[1]
stack=[]
#eiclidean algorithm
A,B=map(int,input().split())
p=max(A,B)
q=min(A,B)
int2=0
gcd=0
while True:
    int2=p%q
    if int2==0:
        gcd=q
        break
    else:
        p=q
        q=int2

stack.append(gcd)
for i in range(2,math.ceil(math.sqrt(gcd))+1):
    if gcd%i==0:
        p=gcd//i
        stack.append(p)
        for x in divisor:
            if i%x==0 and x!=1:
                break
        else:
            divisor+=[i]

while len(stack)!=0:
    p=stack.pop()
    for x in divisor:
        if i%x==0 and x!=1:
            break
    else:
        divisor+=[p]


print(len(divisor))


### FIXED CODE ###

import math

divisor=[1]
stack=[]
#eiclidean algorithm
A,B=map(int,input().split())
p=max(A,B)
q=min(A,B)
int2=0
gcd=0
while True:
    int2=p%q
    if int2==0:
        gcd=q
        break
    else:
        p=q
        q=int2

if gcd!=1:
    stack.append(gcd)
    
for i in range(2,math.ceil(math.sqrt(gcd))+1):
    if gcd%i==0:
        p=gcd//i
        stack.append(p)
        for x in divisor:
            if i%x==0 and x!=1:
                break
        else:
            divisor+=[i]

while len(stack)!=0:
    p=stack.pop()
    for x in divisor:
        if p%x==0 and x!=1:
            break
    else:
        divisor+=[p]


print(len(divisor))
N=int(input())
a=0
for i in range (2,10):
  if N%i==0:
    if N/i<=9:
      a=a+1
if (a==0 and N>1):
  print("No")
else:
    print("Yes")

### FIXED CODE ###

a, b = map(int, input().split()) 
if a<=9 and b<=9:
  print(a*b)
else:
  print(-1)