Problem:


Score : 100 points

Problem Statement

Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.

Given are two integers A and B.

If Takahashi can calculate A \times B, print the result; if he cannot, print -1 instead.

Constraints

1 \leq A \leq 20

1 \leq B \leq 20

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

If Takahashi can calculate A \times B, print the result; if he cannot, print -1.

Sample Input 1

2 5

Sample Output 1

10

2 \times 5 = 10.

Sample Input 2

5 10

Sample Output 2

-1

5\times 10 = 50, but Takahashi cannot do this calculation, so print -1 instead.

Sample Input 3

9 9

Sample Output 3

81



Sample input:
2 5


Sample output:
10

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
2.i=int(n**0.5)
3.while i<n:
4.  if n%i==0:
5.    break
6.  else:
7.    i+=1
8.if i==n:
9.  print(i-1)
10.else:
11.  print(int(i+n/i)-2)

Submission status: Runtime Error

Solution code:
import math
a, b ,x = list(map(int,input().split()))

if x > a*a*b/2:
    theta = math.atan(2*(a*a*b-x)/a/a/a)
else:
    theta = math.atan(a*a*b/2/x)

print(math.degrees(theta))

Submission status: Runtime Error

Solution code:
a,b=list(map(int,raw_input().split(' ')))
if(a>=1 and a<=9 and b>=1 and b<=9):
  print(a*b)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())

if A =< 9:
  if B =< 9:
    x = A*B
  else x = -1
else x = -1

print(x)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())

if A=>1 and A<=9 and B=>1 and B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
input(a,b)
if a<10 and b<10
  print(a*b)
else
  print(-1)

Submission status: Runtime Error

Solution code:
A, B = int(input().split())

if 0<A and A<10 and 0<B and B<10:
    print(A*B)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
A, B = input().split()

if 0<A and A<10 and 0<B and B<10:
    print(A*B)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
import sys

def jeat(a, f, x, K):
    N = 0
    for i in range(len(a)):
        if a[i]*f[i] > x:
            N += a[i] - x // f[i]
    if N > K:
        return False
    if N <= K:
        return True

N,K = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
F = list(map(int, input().split(' ')))
if K >= sum(A):
    print(0)
    sys.exit()
A.sort()
F.sort(reverse = True)
a = 0
b = 10**13
while (True):
    z = (a+b)//2
    if jeat(A,F,z,K) == True:
        if jeat(A,F,z-1,K) == False:
            break
        b = z-1
    else:
        if jeat(A,F,z+1,K) == True:
            z += 1
            break
        a = z+1

print(z)

Submission status: Runtime Error

Solution code:
import sys

def jeat(a, f, x, K):
    N = 0
    for i in range(len(a)):
        if a[i]*f[i] > x:
            N += a[i] - x // f[i]
    if N > K:
        return False
    if N <= K:
        return True

N,K = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
F = list(map(int, input().split(' ')))
if K >= sum(A):
    print(0)
    sys.exit()
A.sort()
F.sort(reverse = True)
a = 0
b = 10**18
while (a<b):
    z = (a+b)//2
    if jeat(A,F,z,K) == True:
        if jeat(A,F,z-1,K) == False:
            break
        b = z-1
    else:
        if jeat(A,F,z+1,K) == True:
            z -= 1
            break
        a = z+1

print(z)

Submission status: Runtime Error

Solution code:
A,B = map(input().split(" "))
if A <= 9 and B <= 9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A,B = input().split(" ")
if A <= 9 and B <= 9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
import math

rawUsrInput = input()
usrInput = rawUsrInput.split()

a = int(usrInput[0])
b = int(usrInput[1])
x = int(usrInput[2])

print(((math.degrees(math.acos(((2*x)/a*b)/(math.sqrt(((4*x*x)/a*a*b*b)+b*b)))))))

Submission status: Runtime Error

Solution code:
import math

rawUsrInput = input()
usrInput = rawUsrInput.split()

a = int(usrInput[0])
b = int(usrInput[1])
x = int(usrInput[2])

print(str(((math.degrees(math.acos((b)/(math.sqrt(4*x*x/(a*a*b*b)+b*b))))))))

Submission status: Runtime Error

Solution code:
import math

rawUsrInput = input()
usrInput = rawUsrInput.split()

a = int(usrInput[0])
b = int(usrInput[1])
x = int(usrInput[2])

print(90 - float(math.degrees(math.acos((b)/(math.sqrt((4*x**2)/(a**2*b**2)+b**2))))))

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())

if A >= 10:
    print(-1)
elif B >= 10:
    print(-1)
else:
    print(A*B)

Submission status: Runtime Error

Solution code:
while True:
    try:
        a = int(input())
        b = int(input())
    except EOFError:
        break
    if a <= 9 and a>=1 and b <= 9 and b>=1:
        print(a * b)
    else:
        print(-1)

Submission status: Runtime Error

Solution code:
while True:
    try:
        a = int(input())
        b = int(input())
    except EOFError:
        break
    if a <= 9 and b <= 9:
        print(a * b)
    else:
        print(-1)

Submission status: Runtime Error

Solution code:
N=int(input())
flag=0
for A in range(1,10):
  for B in range(1,10):
    if N==A*B:
      flag=1
      break
 
print( "Yes" if flag == 1 else "No" )

#if flag==0:
#  print('NO')
#else:
#  print('YES')

Submission status: Runtime Error

Solution code:
x,y = list(map(int,input().split()))
if x < 10 and y < 10:
	print(x*y)
    exit()
else:
  print('-1')

Submission status: Runtime Error

Solution code:
x,y = list(map(int,input().split()))
if x < 10 abd y < 10:
	print(x*y)
    exit()
else:
  print('-1')

Submission status: Runtime Error

Solution code:
n = int(input())
print(n**2)

Submission status: Runtime Error

Solution code:
usrInput = input()
divisor = []
flag = []
finalFlag = False

for kuku in range(9):
    currentDivisor = kuku+1
    if int(usrInput) % currentDivisor == 0:
        divisor.append(currentDivisor)

for x in range(len(divisor)):
    anotherDivisor:float = int(usrInput) / divisor[x]
    if float.is_integer(anotherDivisor) == True and anotherDivisor <= 9:
        flag.append(True)
    else:
        flag.append(False)

for n in range(len(divisor)):
    if bool(flag[n]) == True:
        finalFlag = True

if finalFlag == True:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
usrInput = input()
splitedInput = usrInput.split()
clearFlag = True

for i in range(2):
    if splitedInput[i] > 9:
        clearFlag[i] = False

if clearFlag[0] == True & clearFlag[1] == True:
    print(splitedInput[0] + splitedInput[1])
else:
    print(-1)

Submission status: Runtime Error

Solution code:
usrInput = input()
splitedInput = (usrInpuy.split( ))
clearFlag = True

for i in range(2):
  if splitedInput[i] > 9:
    clearFlag[i] = False

if clearFlag[0] == True && clearFlag[1] == True:
  print(splitedInput[0] + splitedInput[1])
else:
  print(-1)

Submission status: Runtime Error

Solution code:
s = int(input()).split() #s_1 s_2を分割して取得し、sに値を入れる
 #出力：['s_1', 's_2']
A=s[0] #出力：s_1
B=s[1] #出力：s_2

if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
s = input().split()
A = s[0]
B = s[1]

if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
s = input().split() #s_1 s_2を分割して取得し、sに値を入れる
 #出力：['s_1', 's_2']
A=s[0] #出力：s_1
B=s[1] #出力：s_2

if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
 
if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
 
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print('-1')

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())

if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
import numpy as np

N,K = list(map(int, input().split(" ")))
A = list(map(int, input().split(" "))) # consumption coefficient of members
F = list(map(int, input().split(" "))) # difficulty of food

# pair fastest eaters (low consumption coefficient) with most difficult foods
A.sort()
F.sort(reverse=True)
A = np.array(A)
F = np.array(F)

maxT = np.max(A*F)
# use binary search to find lowest possible T
left = -1
right = maxT
while left+1< right:
    mid = (left+right)//2
    if np.maximum(0, A - (mid//F)).sum() <= K:
        right  = mid
    else:
        left = mid
print(right)

Submission status: Runtime Error

Solution code:
import numpy as np

N,K = list(map(int, input().split(" ")))
A = list(map(int, input().split(" "))) # consumption coefficient of members
F = list(map(int, input().split(" "))) # difficulty of food

# pair fastest eaters (low consumption coefficient) with most difficult foods
A.sort()
F.sort(reverse=True)
A = np.array(A)
F = np.array(F)

def how_many_K(A,F,T,K):
    """
    Returns whether the number of training sessions needed for group A with foods F to have a score equal to T is less than K
    """
    num_trains = 0
    for i in range(len(A)):
        a = A[i]
        f = F[i]
        num_trains += max(0, a-T//f)

    if num_trains > K:
        return False
    else:
        return True

maxT = np.max(A*F)
# use binary search to find lowest possible T
left = -1
right = maxT
while left+1< right:
    mid = (left+right)//2
    if how_many_K(A,F,mid,K):
        right  = mid
    else:
        left = mid
print(right)

Submission status: Runtime Error

Solution code:
l=list(map(int,input().split()))
if !(all[i<=9 for i in l]):
  print (-1)
else:
  print(l[0]*l[1])

Submission status: Runtime Error

Solution code:
l=list(map(int,input().split()))
if !all[i<=9 for i in l]:
  print (-1)
else:
  print(l[0]*l[1])

Submission status: Runtime Error

Solution code:
a,b = map(int, input())
if len(str(a)) == 1 and len(str(b)) == 1:
  print(a*b)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
#ABC144_C
#素因数分解して、N＝なるべく差の小さい2つの因数の積、と考える
import math

init_N=int(input())
N=init_N
ans_list=[]
A=1
B=1

for i in range(2,int(math.sqrt(init_N))+1):
    while 1:  
        if N%i==0:
            ans_list.append(i)
            N=N//i
        else:
            break
if N==1:
    pass
else:
    ans_list.append(N)

if len(ans_list)==1:
    print(str(init_N-1))
else:
    while len(ans_list)>0:
        A=A*ans_list.pop(0)
        #print(A)
        if len(ans_list)!=0:
            B=B*ans_list.pop(0)
            #print(B)
    print(str(A+B-2))

Submission status: Runtime Error

Solution code:
#ABC144_C
#素因数分解して、N＝なるべく差の小さい2つの因数の積、と考える
import math

init_N=int(input())
N=init_N
ans_list=[]
A=1
B=1

for i in range(2,int(math.sqrt(init_N))+1):
    while 1:  
        if N%i==0:
            ans_list.append(i)
            N=N//i
        else:
            break
if N==1:
    pass
else:
    ans_list.append(N)

if len(ans_list)==1:
    print(str(init_N-1))
else:
    while len(ans_list)>0:
        A=A*ans_list.pop(0)
        print(A)
        if len(ans_list)!=0:
            B=B*ans_list.pop(0)
            print(B)
    print(str(A+B-2))

Submission status: Runtime Error

Solution code:
a, b = input().split()
if 1<=a,b<=9:
  print(a*b)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A,B = map(int.input().split)

if A > 9 or B > 9:
	print(-1)
else:
	print(A*B)

Submission status: Runtime Error

Solution code:
A = int(input())
B= int(input())
if A > 9 or B > 9:
	print(-1)
else
	print(A*B)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split)

if a > 9 or b > 9:
	print("-1")
else:
	print(a*b)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
if A<=0 or 10<=A:
    print(-1)
elif B<=0 or 10<=B:
    print(-1)
else:
    print(A*B)

Submission status: Runtime Error

Solution code:
A,B=map(int.input(),split())
if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A,B=map(int,input(),split())
if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A,B=map(int,input(),split())
if A,B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())

if A,B<=9:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
if a<10 and b<10:
  print(a*b)
else:
  print("-1")

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
if a<10 and b<10:
  print(a*b)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
# coding:utf-8
A,B = [int(i) for i in input().split]
if (1 <= A <= 9) and (1 <= B <= 9):
    print(A*B)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
# coding:utf-8
A = int(input())
B = int(input())
if (1 <= A <= 9) and (1 <= B <= 9):
    print(A*B)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
a,b= map.(int, input().split())
ans=a*b
if ans=>81:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a, b = map (int, input().split())

if a < 10 and b < 10
  print (a*b)

else:
  print (-1)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

if 0<a<10 and 0<b<10:
  print(a*b)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
if(a>=10):
    print(-1)
elif(b>=10):
    print(-1)
else:
    print(a*b)
    
#print(a+1)
#print(b+1)

Submission status: Runtime Error

Solution code:
a=int(input())
if a>=10:
    print(-1)
else:
    b=int(input())
    if b>=10:
        print(-1)
    else:
        print(a*b)

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
if a>=10:
    print(-1)
elif b>=10:
    print(-1)
else:
    print(a*b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
i = input().split()
if i < 10:
  print(i[0] * i[1])

Submission status: Runtime Error

Solution code:
inp = list(map(int,input().split()))
a  = inpp[1]
b = inp[2]
n = a*b
arr []
hello = 0
for i in range(2,10):
  for x in range (2,10):
    arr.append(i*x)
for element in arr:
  if element == n:
    hello = 0
    break
  else:
    hello = 1
if helo == 1:
  print("-1")
else:
  print(n)

Submission status: Runtime Error

Solution code:
A, B = map(input().split())
if A<=9 and B<=9:
  print(int(A*B))
else:
  print(-1)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split(" "))
if 1 <= A, B <= 9:
    print(A * B)
else:
    print("-1")

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':

	n = int(input())
	m = int(n//2)
	end = n - 1

    for x in range(2,int(n**0.5)+1):
		if n % x == 0:
			y = n // x
			end = min(x+y-2,end)

	print(end)

Submission status: Runtime Error

Solution code:
n=int(input())
import sys
import math
list=[]


for i in range(0,int(math.sqrt(n))):
    if n%(i+1)==0:
        list.append(i-1+(n/(i+1)))

print(int(min(list)))

Submission status: Runtime Error

Solution code:
n = int(input())
ans = "No"

for x in range(1,10):
	if n/x in [1,2,3,4,5,6,7,8,9]:
		ans = "Yes"

print(ans)

Submission status: Runtime Error

Solution code:
def func():
    a = int(input())
    for i in range(1, 10):
        for n in range(1, 10):
            if a == i * n:
                print("Yes")
                return
    print("No")
 
 
func()

Submission status: Runtime Error

Solution code:
N = int(input())
kuku= [1, 2, 3, 4, 5, 6, 7, 8, 9]
c = 0

for a in kuku:
    for b in kuku:
        if a*b == N:
            c+=1
if c>=1:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
if x > 9:
    print(-1)

elif y > 9:
    print(-1)

else:
    print(x*y)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split())) # 消化コスト
F = list(map(int, input().split())) # 食べにくさ
 
import math
import numpy as np
 
A.sort(reverse = True)
F.sort()
 
arrA = np.array(A)
arrF = np.array(F)
 
range_max = max(arrA * arrF) + 1
range_min = max(min((A-K) * B), 0)
 
my_lambda = lambda x: sum([max(math.ceil(A[i] - x/F[i]), 0) for i in range(0, N)]) <= K
 
my_range = range(range_min, range_max)
 
def node(lst):
    len_lst = len(lst)
    if len_lst % 2 == 0:
        mid_idx = int(len_lst/2)
    else:
        mid_idx = int(math.floor(len_lst/2))
 
    if len_lst == 1:
        print(lst[mid_idx])
        return()
 
    if my_lambda(lst[mid_idx-1]) == True:
        left = lst[0:mid_idx]
        node(left)
    else:
        right = lst[mid_idx:]
        node(right)
node(my_range)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
A = list(map(int, input().split())) # 消化コスト
F = list(map(int, input().split())) # 食べにくさ
 
import math
import numpy
 
A.sort(reverse = True)
F.sort()

arrA = np.array(A)
arrF = np.array(F)

range_max = max(arrA * arrF) + 1
range_min = max(min((A-K) * B), 0)
 
my_lambda = lambda x: sum([max(math.ceil(A[i] - x/F[i]), 0) for i in range(0, N)]) <= K
 
my_range = range(range_min, range_max)
 
def node(lst):
    len_lst = len(lst)
    if len_lst % 2 == 0:
        mid_idx = int(len_lst/2)
    else:
        mid_idx = int(math.floor(len_lst/2))
 
    if len_lst == 1:
        print(lst[mid_idx])
        return()
 
    if my_lambda(lst[mid_idx-1]) == True:
        left = lst[0:mid_idx]
        node(left)
    else:
        right = lst[mid_idx:]
        node(right)
node(my_range)

Submission status: Runtime Error

Solution code:
a,b = map(int , input().split())

if a,b > 9:
  print(a*b)
  else:
    print(-1)

Submission status: Runtime Error

Solution code:
A, B = [int(input()) for i in range(2)]
result = int(int(A)*int(B))
if 9 < int(A) and 9 < int(B):
    print(-1)
else:
    print(result)

Submission status: Runtime Error

Solution code:
A, B =[int(input()) for i in range(2)]
result = int(int(A)*int(B))
if 9 < int(A):
    print(-1)
elif 9 < int(B):
    print(-1)
else:
    print(result)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
result = int(A)*int(B)
if 9 < int(A):
    print(-1)
elif 9 < int(B):
    print(-1)

else:
    print(result)

Submission status: Runtime Error

Solution code:
ar=map(int,input().split())
print(ar[0]<10 and ar[1]<10)

Submission status: Runtime Error

Solution code:
a, b = input().split()
ans = -1
if a < 10 and b < 10:
    ans = a * b
print(ans)

Submission status: Runtime Error

Solution code:

n = int(input())
array = []
for i in range(1,10):
    for j in range(1,10):
        array.append(i * j)
        
if n in array:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
answer = 0

if a >= 10 or b >= 10:
  answer = -1
else:
  answer = a * b
  
print(answer)

Submission status: Runtime Error

Solution code:
a,b=map(int(input().split()))

print(a*b if 1<=a<=9 and 1<=b<=9 else -1)

Submission status: Runtime Error

Solution code:
a,b=map(int(input().split()))

print('Yes' if 1<=a<=9 and 1<=b<=9 else 'No')

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(a**(1/2))
m=a
for i in range (2,b+1):
  if a%i==0:
    m=i
c=a/m
print(int(m+c-2))

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")
print(a)

Submission status: Runtime Error

Solution code:
N=int(input())
a=0
for i in range (2,9):
  if N%i==0:
    if N/i<=9:
      a=a+1
if a==0 and N>1:
  print("no")
else:
    print("yes")

Submission status: Runtime Error

Solution code:
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"sort"
	"strconv"
	"strings"
)

func main() {
	io := NewIo()
	defer io.Flush()

	a, b := io.Int(), io.Int()

	if 1 <= a && a <= 9 {
		if 1 <= b && b <= 9 {
			fmt.Println(a * b)
			return
		}
	}
	fmt.Println(-1)

}

type Io struct {
	reader    *bufio.Reader
	writer    *bufio.Writer
	tokens    []string
	nextToken int
}

func NewIo() *Io {
	return &Io{
		reader: bufio.NewReader(os.Stdin),
		writer: bufio.NewWriter(os.Stdout),
	}
}

func (io *Io) Flush() {
	err := io.writer.Flush()
	if err != nil {
		panic(err)
	}
}

func (io *Io) NextLine() string {
	var buffer []byte
	for {
		line, isPrefix, err := io.reader.ReadLine()
		if err != nil {
			panic(err)
		}
		buffer = append(buffer, line...)
		if !isPrefix {
			break
		}
	}
	return string(buffer)
}

func (io *Io) Next() string {
	for io.nextToken >= len(io.tokens) {
		line := io.NextLine()
		io.tokens = strings.Fields(line)
		io.nextToken = 0
	}
	r := io.tokens[io.nextToken]
	io.nextToken++
	return r
}

func (io *Io) Int() int {
	i, err := strconv.Atoi(io.Next())
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) Float() float64 {
	i, err := strconv.ParseFloat(io.Next(), 64)
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) PrintLn(a ...interface{}) {
	fmt.Fprintln(io.writer, a...)
}

func (io *Io) Printf(format string, a ...interface{}) {
	fmt.Fprintf(io.writer, format, a...)
}

func (io *Io) PrintIntLn(a []int) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.PrintLn(b...)
}

func (io *Io) PrintStringLn(a []string) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.PrintLn(b...)
}

func Log(name string, value interface{}) {
	fmt.Fprintf(os.Stderr, "%s=%+v\n", name, value)
}

func Abs(a int) int {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func Pow(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

func Min(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton min() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Min(float64(res), float64(nums[i])))
	}
	return res
}

func Max(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton max() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Max(float64(res), float64(nums[i])))
	}
	return res
}

func SortAsc(a []int) []int {
	sort.Ints(a)
	return a
}

func SortDesc(a []int) []int {
	sort.Sort(sort.Reverse(sort.IntSlice(a)))
	return a
}

func GCD(a, b int) int {
	if b == 0 {
		return a
	}
	return GCD(b, a%b)
}

func LCM(a, b int) int {
	if a == 0 && b == 0 {
		return 0
	}
	return a * b / GCD(a, b)
}

func CumSum(nums []int) []int {
	sums := []int{0}

	for i := 0; i < len(nums); i++ {
		sums = append(sums, sums[i]+nums[i])
	}
	return sums
}

func BisectLeft(nums []int, left, right int, target int) int {
	if left == right {
		if nums[left] == target {
			return left
		} else if nums[left] < target {
			return left + 1
		} else {
			return left
		}
	}

	mid := (left + right) / 2
	if nums[mid] == target {
		return mid
	}

	if nums[mid] > target {
		return BisectLeft(nums, left, mid, target)
	} else if nums[mid] < target {
		return BisectLeft(nums, mid+1, right, target)
	}
	return 0
}

func Permutations(nums []int) [][]int {
	n := len(nums)
	if n == 0 {
		return [][]int{}
	}
	ans := [][]int{}

	for _, n := range nums {
		rest := remove(nums, n)
		lists := Permutations(rest)
		if len(lists) == 0 {
			lists = [][]int{nil}
		}

		for i := 0; i < len(lists); i++ {
			lists[i] = append(lists[i], n)
			ans = append(ans, lists[i])
		}
	}
	return ans
}

func remove(nums []int, target int) []int {
	result := []int{}
	for i := 0; i < len(nums); i++ {
		if nums[i] != target {
			result = append(result, nums[i])
		}
	}
	return result
}

func PowerSet(nums []int) [][]int {
	size := Pow(2, len(nums))
	result := make([][]int, size)

	idx := 0
	result[idx] = []int{}
	idx++

	for _, n := range nums {
		max := idx
		for i := 0; i < max; i++ {
			result[idx] = copyAndAppend(result[i], n)
			idx++
		}
	}

	return result
}

func copyAndAppend(nums []int, n int) []int {
	dst := make([]int, len(nums)+1)
	copy(dst, nums)
	dst[len(nums)] = n
	return dst
}

func Combination(nums []int, k int) [][]int {
	size := len(nums)
	result := make([][]int, CombinationCount(len(nums), k))
	bi := (1 << uint(k)) - 1
	max := 1 << uint(size)
	idx := 0

	for bi < max {
		flags := bi
		s := []int{}
		for _, n := range nums {
			if flags%2 != 0 {
				s = append(s, n)
			}
			flags /= 2
		}
		result[idx] = s
		idx++
		bi = Combination2NextIndex(bi)
	}
	return result
}

func Combination2NextIndex(n int) int {
	smallest := n & -n
	ripple := n + smallest
	newSmallest := ripple & -ripple
	ones := ((newSmallest / smallest) >> 1) - 1
	return ripple | ones
}

func CombinationCount(n, m int) int {
	return Fact(n) / (Fact(n-m) * Fact(m))
}

func Fact(n int) int {
	if n == 0 {
		return 1
	} else {
		return n * Fact(n-1)
	}
}

func Divisors(n int) []int {
	divisors := map[int]bool{}
	for i := 1; i < int(math.Sqrt(float64(n)))+1; i++ {
		if n%i == 0 {
			divisors[i] = true
			//divisors = append(divisors, i)
			if i != n {
				divisors[n/i] = true
				//divisors = append(divisors, n/i)
			}
		}

	}
	ans := []int{}
	for k := range divisors {
		ans = append(ans, k)
	}
	return ans
}

Submission status: Runtime Error

Solution code:
n=int(input())

print(n**2)

Submission status: Runtime Error

Solution code:
arr = input().split()
if arr[0]<10 and arr[1]<10:
  return arr[0]*arr[1]
else: return -1

Submission status: Runtime Error

Solution code:
from typing import List


class Solution:
    def solve(self, a: int, b: int) -> int:

        if 1 <= a <= 9 and 1 <= b <= 9:
            return a*b
        else:
            return -1


if __name__ == '__main__':

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

    # solve
    solution = Solution()
    print(solution.solve(a, b))

Submission status: Runtime Error

Solution code:
a,b=mqp(input().split(' '))

if a<10 and b<10:
  print(a*b)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
n = int(input())
flag = 0

for i in range(1,10):
    for j in range(1,10):
        if i*j == n:
            flag = 1

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

Submission status: Runtime Error

Solution code:
A,B = int(input())
if A<=9:
  if B<=9:
    print(A*B)
  else:
    print(-1)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
    x, y = map(int, input().split())
    if 0 < x < 10 and 0 < y < 10:
        print(x * y)
    else:
        print(-1)

Submission status: Runtime Error

Solution code:
import math 

def quick_sort(arr):
    left = []
    right = []
    if len(arr) <= 1:
        return arr

    # データの状態に左右されないためにrandom.choice()を用いることもある。
    # ref = random.choice(arr)
    ref = arr[0]
    ref_count = 0

    for ele in arr:
        if ele < ref:
            left.append(ele)
        elif ele > ref:
            right.append(ele)
        else:
            ref_count += 1
    left = quick_sort(left)
    right = quick_sort(right)
    return left + [ref] * ref_count + right

def costsum(x,y):
    siguma =0
    Asort = quick_sort(x)
    Fsort = quick_sort(y)
    for i in range(N):
        siguma = siguma + Asort[i]*Fsort[N-i-1]
    return siguma
def maxseki(x,y):
    seki = 0
    count = 0
    Asort = quick_sort(x)
    Fsort = quick_sort(y)
    for i in range(N):
        if seki < Asort[i]*Fsort[N-i-1]:
            seki = Asort[i]*Fsort[N-i-1]
            count = i
    return count

input1 = input()
input2 = input()
input3 = input()

hairetu1 = input1.split()
hairetu2 = input2.split()
hairetu3 = input3.split()
N = int(hairetu1[0])
K = int(hairetu1[1])
A = [int(s) for s in hairetu2] 
F = [int(t) for t in hairetu3]

Asort = quick_sort(A)
Fsort = quick_sort(F)

for i in range(K):
    s=maxseki(Asort,Fsort)
    Asort[s]=Asort[s]-1


P = maxseki(Asort,Fsort)
maxcost = Asort[P]*Fsort[N-P-1]
if maxcost < 0:
    maxcost =0
print (maxcost)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
if(A<=9 and B<=9):
  print(A*B)
else:
  print('-1')

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
if(1<=A<=9 and 1<=B<=9):
  print(A*B)
else:
  print('-1')

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print('-1')

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
if 1=<A=<9 and 1=<B=<9:
  print(A*B)
else:
  print('-1')

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())

if a < 1 or a > 9:
    return -1

if b < 1 or b > 9:
    return -1

return a * b

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())

if a < 1 or a > 9:
    return -1

if b < 1 or b > 9;
    return -1

return a * b

Submission status: Runtime Error

Solution code:
A = map(int,input().split())
B = map(int,input().split())
if 1 <= A <= 9 and 1<= B <= 9:
	print(A*B)
else:
	print(-1)

Submission status: Runtime Error

Solution code:
A = map(int,input())
B = map(int,input())
if 1 <= A <= 9 and 1<= B <= 9:
	print(A*B)
else:
	print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int,input().split())

if 1<=a=<9,1<=b<=9:
  print(a*b)
else:
  pritn("-1")

Submission status: Runtime Error

Solution code:
A, B = map(int, raw_input().split())

return A*B if A <= 9 and B <= 9 else -1

Submission status: Runtime Error

Solution code:
s = input().split()
output = -1
if (0 < s[0] and s[0] < 10 and 0 < s[1] and s[1] < 10):
  output = s[0]*s[1]
  
return output;

Submission status: Runtime Error

Solution code:
import math
N = int(input())
M = int(math.sqrt(N))
for i in range(M, 0, -1):
    if N % i == 0:
        A = N / i
        print(int(A + i - 2))
        break

Submission status: Runtime Error

Solution code:
import math
N = int(input())
M = int(math.sqrt(N))
for i in range(M, 0, -1):
    if N % i == 0:
        A = N / i
    	print(A + i - 2)
    	break

Submission status: Runtime Error

Solution code:
N = int(input())

l = []
for i in range(1, 10):
    for j in range(1, 10):
        l.append(i * j)

if N in l:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
A,B = map(int,input())
if(A<10 and B<10):
  print(A*B)
else:
  print(-1)