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

Solution (Python):

A, B =map(int , input().split())

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

Solution (Python):

A, B = map(int,input().split())

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

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

Solution (Python):
temp = input().split()
a = int(temp[0])
b = int(temp[1])
if 1 <= a and a <= 9 and 1 <= b and b <= 9:
  print(a * b)
else:
  print(-1)

Solution (Python):
x,y = map(int,input().split())

if x < 10 and y < 10 and x > 0 and y > 0:
    print(x*y)
else:
    print(-1)

Solution (Python):



def solve(*args: str) -> str:
    a, b = map(int, args[0].split())
    ret = -1
    if a < 10 and b < 10:
        ret = a*b

    return str(ret)


if __name__ == "__main__":
    print(solve(*[input() for _ in range(1)]))

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

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

Solution (Python):
A, B = list(map(int, input().split()))
if (A > 9) or (B > 9):
	print(-1)
else:
    print(A * B)

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

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

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



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

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

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

Solution (Python):
l = input().split(" ")
a = int(l[0])
b = int(l[1])
if a >= 1 and a <= 9 and b >= 1 and b <= 9:
	print(a*b)
else:
	print(-1)

Solution (Python):
a,b = map(int,input().split())
if a >9 or b>9:
    print(-1)
else:
    print(a*b)

Solution (Python):
[A,B] = [int(x) for x in input().split()]
if A<10 and B<10:
    print(A*B)
else:
    print (-1)

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

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

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

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

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

Solution (Python):

a, b = map(int, input().split())
if a > 9 or b > 9:
    print("-1")
else:
    print("{}".format(a*b))

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

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

if a>9:
  print(-1)

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

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

Solution (Python):
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

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

Solution (Python):
n,m=map(int,input().split())
if 1<=n<=9 and 1<=m<=9:
  print(n*m)
else:
  print(-1)

Solution (Python):
if __name__ == "__main__":
    A, B = map(int, input().split(" "))
    if A < 10 and B < 10:
        print(A * B)
    else:
        print(-1)

Solution (Python):
if __name__ == "__main__":
    a, b = input().split()
    a = int(a)
    b = int(b)
    if a<1 or a>9:
        print(-1)
    elif b<1 or b>9:
        print(-1)
    else :
        print(a*b)

Solution (Python):
a, b = map(int, input().split())
if a >= 10 or b >= 10:
    print(-1)
else:
    print(a*b)

Solution (Python):
a,b = map(int,input().split())
if a>9 or b>9:
    print("-1")
else :
    print(str(a*b))

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

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

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

Solution (Python):
def calc(A, B):
    if A < 10 and B < 10:
        return A * B
    else:
        return -1


(A, B) = tuple([int(s) for s in input().split()])

print(calc(A, B))

Solution (Python):

A, B=map(int, raw_input().split())

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    a, b = map(int, input().split())

    def check(x):
        return x < 1 or x > 9


    if check(a) or check(b):
        print(-1)
    else:
        print(a*b)

if __name__ == '__main__':
    main()

Solution (Python):

def test(a):
    return 1 <= a and a <= 9
def sol(a,b):
    if test(a) and test(b):
        return a*b
    else :
        return -1

read = input 
rn = lambda :list(map(int, read().split()))
def reverse_range(r):return range(r-1, -1, -1)
a,b = rn()
print(sol(a,b))

Solution (Python):
a, b = (int(x) for x in input().split())
print(a*b if a <= 9 and b <= 9 else -1)

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

Solution (Python):
a,b=map(int,input().split())
if a>9 or b>9:
  print(-1)
else:
  print(a*b)

Solution (Python):
N=input()
N=[int(item) for item in N.split()]
A=N[0]
B=N[1]
if 0<A<10 and 0<B<10:
    print(A*B)
else:
    print(-1)

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

Solution (Python):
def answer():
    a, b = map(int, input().split())
    if a < 10 and b < 10:
        result = a * b
    else:
        result = -1

    print(result)


if __name__ == '__main__':
    answer()

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

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

def check(a,b,n):
    return a<= n and n<= b

ans = A*B if check(1,9,A) and check(1,9,B) else -1
print(ans)

Solution (Python):
A, B = input().split()
length = len(A)+len(B)
A, B = map(int, [A,B])
ans = A*B

if  length != 2:
    ans = -1

print(ans)

Solution (Python):
a, b = map(int, input().split())
if a > 9 or b > 9:
  print("-1")
else:
  print(a * b)

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

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

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

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

ans = A*B
if A>9:
    ans=-1
if B>9:
    ans=-1
print(ans)

Solution (Python):
A,B = [ int(x) for x in input().split()]

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

Solution (Python):
a = list(map(int, input().split()))
b,c = a[0],a[1]
if b <= 9 and c <= 9:
    print(b*c)
else:
    print(-1)

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

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

Solution (Python):
AB = input().split()
A = int(AB[0])
B = int(AB[1])
if A < 10 and B < 10:
  print(A * B)
else:
  print(-1)

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

Solution (Python):



A, B = map(int, input().split())

if(A < 10 and B < 10):
  print("{}".format(A*B))
else:
  print("-1")

Solution (Python):
t=input().split(' ')
a=int(t[0]);b=int(t[1])
if not (0<=a<=9 and 0<=b<=9):
    print('-1')
else:
    print(a*b)

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

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

Solution (Python):
def main(a, b):
    if 1 <= a <= 9 and 1 <= b <= 9:
        return a * b
    else:
        return -1


if __name__ == '__main__':
    A, B = map(int, input().split())
    print(main(A, B))

Solution (Python):
s=list(map(int,input().split()))
a=int(s[0])
b=int(s[1])
if a//10==0 and b//10==0:
	print(a*b)
else:
	print(-1)

Solution (Python):

import random

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

if ab[0] >=10 or ab[1] >= 10:
	print(-1)
else:
	print(ab[0] * ab[1])

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

if a >= 10 or b >= 10:
    print(-1)
elif a * b <= 81:
    print(a * b)
else:
    print(-1)

Solution (Python):
get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

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

Solution (Python):
a, b = list(map(int, input().split(" ")))
if a > 9 or b > 9:
  print(-1)
else:
  print(a * b)

Solution (Python):
import sys

A, B = list(map(int, input().split()))
if A >= 10 or B >= 10:
    print(-1)
    sys.exit()

print(A*B)

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

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

Solution (Python):


if __name__ == "__main__":
    A, B = map(int, input().split())
    
    if A > 0 and A < 10:
        if B > 0 and B < 10:
            print(A*B)
        else:
            print('-1')
    else:
        print('-1')

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

Solution (Python):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    A, B = MAP()

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


if __name__ == '__main__':
    main()

Solution (Python):








obj = input().strip().split(' ')
A, B = list(map(int, obj))


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

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
ii0 = lambda: ii() - 1
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    A, B = mis()
    if A <= 9>= B:
        print(A*B)
    else:
        print(-1)


main()

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

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

Solution (Python):
a, b = map(int, input().split())
if a >= 10 or b >= 10:
  print(-1)
else:
  print(a*b)

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

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

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

Solution (Python):


def main():
    A,B  = map(int, input().split())
    if A > 9:
        print(-1)
        exit()
    if B > 9:
        print(-1)
        exit()
    print(A * B)

        
if __name__ == '__main__':
    main()

Solution (Python):
import sys

A, B = map(int, input().split())

if A < 1 or A > 9:
    print(-1)
    sys.exit()

if B < 1 or B > 9:
    print(-1)
    sys.exit()

print(A*B)

Solution (Python):
i = input()
A = int(i.split(' ')[0])
B = int(i.split(' ')[1])

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

Solution (Python):
A, B = map(int, input().split())
if (A > 9 or B > 9):
  print(-1)
else:
  print(A*B)

Solution (Python):

A, B = list(map(int, input().split()))

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

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

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

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

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

Solution (Python):
a,b=map(int,input().split())
if (a<=0 or a>9) or (b<=0 or b>9):
    print("-1")
else:
    print(a*b)

Solution (Python):
import sys
import math

A,B = list(map(int,input().split()))

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

Solution (Python):
A,B  = map(int, input().split(' '))
if (A >=10) or (B >=10):
    print(-1)
else:
    print(A*B)

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

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

Solution (Python):
a, b = map(int,input().split())
res = 0

if (a>9) | (b>9):
    res = -1
else:
    res = a*b

print(res)

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

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

Solution (Python):
input_array = input().split(' ')
if int(input_array[0]) > 9 or int(input_array[1]) > 9:
    print(-1)
else:
    print(int(input_array[0])*int(input_array[1]))

Solution (Python):
tem = input().split()
a = int(tem[0])
b = int(tem[1])

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

print(result)

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

Solution (Python):
A,B = map(int,input().split())
ans = -1
if A < 10 and B < 10:
    ans = A * B
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
A, B = map(int, input().split())
if A <= 9 and B <= 9:
  print(A * B)
else: print(-1)

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)

def main():

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

main()

Solution (Python):
n = list(map(int, input().strip().split()))
a = n[0]
b = n[1]

r = range(1,10)
if(a in r and b in r):
    print(a*b)
else:
    print(-1)

Solution (Python):

import sys
import bisect
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]


    a, b  = LMIIS()

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



if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().split())
if(a >= 10):
	print ("-1")
elif(b >= 10):
	print ("-1")
else:
	print (a * b)

Solution (Python):
n,m = list(map(int, input().split()))
if (n <= 9 and m <= 9):
  print(n*m)
else:
  print(-1)

Solution (Python):
a, b = map(str, input().split())
if len(a) > 1 or len(b) > 1:
        print(-1)
else:
        print(int(a) * int(b))

Solution (Python):
x = [int(i) for i in input().split()]

if x[0] <= 9 and x[1] <= 9:
  print(x[0] * x[1])
else:
  print(-1)

Solution (Python):
def a():
    a, b = map(int, input().split())
    if a >= 10 or b >= 10:
        print(-1)
        return
    print(a * b)


if __name__ == '__main__':
    a()

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

Solution (Python):
a, b = [int(n) for n in input().split()]
if a < 10 and b < 10:
    print(a * b)
else:
    print(-1)

Solution (Python):
a,b = [int(_) for _ in input().split()]
ans = -1
if 1 <= a <= 9 and 1 <= b <= 9:
    ans = a * b
print(ans)

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

if (A > 9 or A < 1) or (B > 9 or B < 1) :
    print("-1")
    exit()

print(A*B)

Solution (Python):
a, b = list(map(lambda x: int(x), input().split()))

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

print(ans)

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

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

Solution (Python):
a,b=map(int, input().split())
if(a >9 or b >9):
    print(-1)
else:
    print(a * b)

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

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

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

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

Solution (Python):
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


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




def B():
    N = II()
    A, B = LI()
    ans = 0
    for i in range(N):
        for x in range(i+1, N):
            ans += d[i]*d[x]
    print(ans)

    return




def C():
    N = II()
    S = input()
    c = 0
    count = 0
    for i in S:
        if i != c:
            count += 1
        c = i
    print(count-1)

    return




def D():
    N = II()
    L = LI()
    L.sort()

    count = 0
    for i in range(N-2):

        for j in range(i+1, N-1):

            p = L[i]+L[j]

            count += sum(x < p for x in L)-j-1

    print(count)

    return




def E():
    N, M = LI()
    bit_max = 1 << N
    dp = [[inf for i in range(bit_max)] for j in range(M+1)]
    dp[0][0] = 0

    for i in range(M):
        a, b = LI()

        c = LI()
        bit = 0

        for d in c:
            bit |= 1 << (d-1)

        for w in range(bit_max):

            t = w | bit
            cost = dp[i][w] + a

            dp[i+1][t] = min(dp[i+1][t], cost)

            dp[i+1][w] = min(dp[i][w], dp[i+1][w])

    print(-1) if dp[-1][-1] == inf else print(dp[-1][-1])

    return




def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    



def solution(S):
    
    N=len(S)
 
    



    
    pass



if __name__ == '__main__':
    A()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]






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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

A, B = map(int, input().split())

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

Solution (Python):

import sys


def solve(A: int, B: int):
    if 1 <= A <= 9 and 1 <= B <= 9:
        print(A * B)
    else:
        print(-1)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
a, b = (int(i) for i in input().split())

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    AB = list(map(int, input().split()))
    A = AB[0]
    B = AB[1]

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


if __name__ == '__main__':
    main()

Solution (Python):

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

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

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

Solution (Python):
import sys
from pprint import pprint

def solve(a, b):
    if 1 <= a <= 9 and 1 <= b <= 9:
        print(a*b)
    else:
        print(-1)

if __name__ == '__main__':
    a, b = map(int, sys.stdin.readline().strip().split(" "))
    solve(a, b)

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

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

Solution (Python):
a, b = map(int, input().split())
if a > 9 or b > 9:
    print(-1)
else:
    print('{}'.format(a * b))

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

Solution (Python):
input = input().split()
a, b = int(input[0]), int(input[1])

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

else:
    print(-1)

Solution (Python):
A, B = list(map(int, input().split()))
if A in range(1,10) and B in range(1,10):
	print(A*B)
else:
	print(-1)

Solution (Python):

A, B = map(int,input().split())

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

Solution (Python):
a,b=map(int,input().split())
flg=True
if a<=0 or a>=10:
    flg=False
if b<=0 or b>=10:
    flg=False

if flg:
    print(a*b)
else:
    print(-1)

Solution (Python):
import sys
a, b = map(int, sys.stdin.readline().strip().split())
if (1 <= a <= 9) & (1 <= b <= 9):
    print(a * b)
else:
    print(-1)

Solution (Python):
import numpy as np


AB=np.array(input().split(),dtype=np.int32)
A=AB[0]
B=AB[1]

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

print(result)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
A, B = [int(item) for item in input().split()]
if A >= 10 or B >= 10:
    print(-1)
else:
    print(A*B)

Solution (Python):

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


if __name__ == '__main__':
    main()

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

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

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

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

ans = a * b

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

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

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

Solution (Python):
input = str(input()).split(" ")
input = [int(x) for x in input]
a = input[0]
b = input[1]

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

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

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

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

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

if A < 10 and B <10:
    print(A*B)

else:
    print(-1)

Solution (Python):
a, b = [int(x) for x in input().split()]
if max(a,b) <= 9:
    print(a*b)
else:
    print(-1)

Solution (Python):



A, B = map(int, input().split())

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

Solution (Python):
N=list(map(int, input().split()))

ans=N[0]*N[1]

if  N[0]<10 and N[1]<10:
    print (ans)
else:
    print(-1)

Solution (Python):
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')


A,B = inpl()

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

Solution (Python):

A, B = map(int, input().split())

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

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

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

Solution (Python):
a, b = map(int, input().split())
if a >= 10 or b >= 10:
    print(-1)
else:
    print(a*b)

Solution (Python):
a, b = map(int, input().split())
if a >= 10 or b >= 10:
	res = -1
else:
	res = a * b

print(res)

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

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

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

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

print(ans)

Solution (Python):

A, B = map(int, input().split())

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

Solution (Python):



import unittest
from io import StringIO
import sys


def input():
    return sys.stdin.readline().rstrip()


def resolve():
    A, B = map(int, input().split())

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


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2 5"""
        output = """10"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """5 10"""
        output = """-1"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """9 9"""
        output = """81"""
        self.assertIO(input, output)


if __name__ == "__main__":
    
    resolve()

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

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

Solution (Python):
a,b = map(str, input().split())

if len(a)==1 and len(b)==1:
    print(int(a)*int(b))
else:
    print(-1)

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

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

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

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

Solution (Python):
A, B = [int(x) for x in input().split()]

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

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

Solution (Python):
A,B=input().split();A,B=int(A),int(B)
if A>=10 or B>=10:
    print('-1')
else:
    print(A*B)

Solution (Python):
import numpy as np
A,B=np.array(list(map(int, input().split())))
if A<=9 and B<=9:
    print(int(A*B))
else:
    print(int(-1))

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

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

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

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