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 1 <= A <= 9 and 1 <= B <= 9:
    print("{}".format(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 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 A>9 or B>9:
  print(-1)
else:
  print(A*B)

Solution (Python):
from fractions import gcd
from datetime import date, timedelta
from heapq import*
import math
from collections import defaultdict, Counter, deque
import sys
from bisect import *
import itertools
import copy
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7




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



            
            
            
            
            
        


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):
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 < 10 and b < 10:
    print(a*b)
else:
    print(-1)

Solution (Python):
nums=[int(i) for i in input().split()]
if 1<=nums[0]<=9 and 1<=nums[1]<=9:
	ans=nums[0]*nums[1]
	print(ans)
else:
	print(-1)

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

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())
print(A*B if A<=9 and B<=9 else'-1')

Solution (Python):
n, k = map(int, raw_input().split())
if n < 10 and k < 10:
    print n * k
else:
    print -1

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

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


if __name__ == '__main__':
    main()

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 and B < 10:
    print(A * B)
else:
    print(-1)

Solution (Python):
num = input().split()
l = []
for i in num:
	l.append(int(i))
if l[0] >= 10 or  l[1] >= 10:
    print("-1")
else:
    a = l[0] * l[1]
    print(a)

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):
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__':

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

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

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 = 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 <= 9 and B <= 9:
    print(A * B)
else:
    print(-1)

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

if 0<a and a<10 and 0<b 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 = 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):
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 9 < A or 9 < B:
    print(-1)
    exit()

print(A*B)

Solution (Python):
s=input();a,b=map(int,s.split())
print([a*b,-1][len(s)>3])

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 = 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:
  if B<=9:
    print(A*B)
  else:
    print(-1)
else:
  print(-1)

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

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

Solution (Python):
x,y = map(int, input().split())
if x>0 and x<10 and y>0 and y<10:
	print(x*y)
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 and B<10:
  print(A*B)
else:
  print(-1)

Solution (Python):




def I(): return int(input())


def IsIl(): return list(map(lambda x: int(x), input().split()))


def InIl(n): return [input() for i in range(n)]


def IsIt(): return map(lambda x: int(x), input().split())


def InIl(n): return map(input() for i in range(n))


def SsSl(): return list(map(lambda x: x, input()))




def SSd():
    from collections import defaultdict
    A = input() 
    dd=defaultdict(int)
    for a in A:
        dd[a]+=1
    return dd

n,m=IsIt()

if 1 <= n and n <= 9 and 1 <= m and m <= 9:
    print(n*m)
else:
    print(-1)

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

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):
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 (1<=a<=9) & (1<=b<=9):
    print(a*b)
else:
    print(-1)

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

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 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print(-1)

Solution (Python):
s = input()
if len(s) > 3:
  print(-1)
else:
  print(eval(s.replace(" ", "*")))

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())
print(a * b if (a <= 9 and b <=9) else -1)

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

Solution (Python):



input_val = list(map(int, input().strip().split()))

if input_val[0] < 10 and input_val[1] < 10:
    cal_val = input_val[0] * input_val[1]
else:
    cal_val = -1

print(cal_val)

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

if a > 0 and a < 10 and b > 0 and b < 10 :
    result = a * b

print(result)

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

if (a < 1) or (a > 9) or (b < 1) or (b > 9):
  print(-1)
  exit(0)

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):
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=input().split()
a=int(a)
b=int(b)
if b>9 or a>9:
    print(-1)
else:
    print(a*b)

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

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

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

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


if __name__ == '__main__':
    main()

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

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


if __name__ == '__main__':
    main()

Solution (Python):
s = input().split()
output = -1
s0 = int(s[0]) 
s1 = int(s[1]) 
if (0 < s0 and s0 < 10 and 0 < s1 and s1 < 10):
  output = s0*s1
  
print(output);

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

if num[0] < 10 and num[1] < 10:
  print(num[0]*num[1])
else:
  print(-1)

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

Solution (Python):
s = tuple(map(int, input().split()))
print(s[0]*s[1] if s[0] < 10 and s[1] < 10 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(a<10 and b<10):
    print(a*b)
else:
    print('-1')

Solution (Python):
from sys import stdin
A, B = [int(x) for x in stdin.readline().rstrip().split()]

if A < 10 and B < 10:
    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 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 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())

if a < 10 and b < 10:
    print("{}".format(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 = 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):
if __name__ == "__main__":
    li = list(map(int,input().split()))
    if(li[0]<10 and li[1]<10):
        print(li[0]*li[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 < 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 > 9 or 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):
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):
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 >= 1 and A <= 9) and (B >= 1 and B <= 9):
  print(A * B)
  
else:
  print(-1)

Solution (Python):
i = list(map(int, input().split()))
if 1 <= i[0] <= 9 and 1 <= i[1] <= 9:
  print(i[0] * i[1])
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 = map(int, input().split())
if A<=9 and B<=9:
    print(A*B)
else:
    print(-1)

Solution (Python):
C = list(map(int,input().split()))
if C[0]<10 and C[1] < 10:
    print(C[0]*C[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):
n=list(map(int,input().split()))
a=[i for i in range(1,10)]
ans=0
if n[0] in a and n[1] in a:
  ans=n[0]*n[1]
else:
  ans=-1
print(ans)

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

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

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

if a > 9 or b > 9:
	print("-1")
else:
	out = a * b
	print('{0}'.format(out))

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 = map(int, input().split())
if 1 <= a <= 9 and 1 <= b <= 9:
    print(a*b)

else:
    print(-1)

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

print(ans)

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(str, input().split())
num = [str(x) for x in range(1, 10)]
if a in num and b in num:
  print(int(a)*int(b))
else:
  print(-1)

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

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

product = a * b

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

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

if a <10 and b<10:
	ret=a*b
	print(ret)
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 < 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 = (int(num) for num in 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)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(0-1)

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

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

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

if 0<a<10:
	if 0<b<10:
		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):
ab = input()
a, b = ab.split(" ")
A = int(a)
B = int(b)

if "0" in a or "0" in b or A > 9 or 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):
n=[int(x) for x in input().split()]

ans = -1
if n[0]>9:
    print(-1)
elif n[1]>9:
    print(-1)
else:
    print(n[0]*n[1])

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

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


class Input():
    def __init__(self):
        self.line = input()

    def number(self):
        return int(self.line)

    def numbers(self):
        array = self.line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def strings(self):
        return self.line.split(' ')


def main():
    ipt = Input()
    ab = ipt.numbers()
    a = ab[0]
    b = ab[1]

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


main()

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


class Input():
    def __init__(self):
        self.line = input()

    def number(self):
        return int(self.line)

    def numbers(self):
        array = self.line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def strings(self):
        return self.line.split(' ')


def main():
    ipt = Input()
    ab = ipt.numbers()
    a = ab[0]
    b = ab[1]

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


main()

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


class Input():
    def __init__(self):
        self.line = input()

    def number(self):
        return int(self.line)

    def numbers(self):
        array = self.line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def strings(self):
        return self.line.split(' ')


def main():
    ipt = Input()
    ab = ipt.numbers()
    a = ab[0]
    b = ab[1]

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


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 = map(int, input().split())

if min(a, b) < 1 or max(a, 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 < 10 and b < 10:
    print(a*b)
else:
    print("-1")

Solution (Python):
a,b=[int(x) for x in 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(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, open(0).read().split())
if (A < 10) and (B < 10):
  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>9 or B>9:
    print(-1)
else:
    print(A*B)

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

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

Solution (Python):
x,y = map(int,input().split())
if(1<=x<=9)and(1<=y<=9):
    print(x*y)
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):
from sys import stdin
input = [int(x) for x in stdin.readline().split()]
input_ys = [x for x in input if x < 10]

if len(input_ys) == 2:
    print(input_ys[0] * input_ys[1])
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 < 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 = map(int, input().split())
if ( a > 9 or b > 9 ):
    print(-1)
    exit(0)
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):
out = input().split()
a = int(out[0])
b = int(out[1])

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

Solution (Python):
x, y = input().split()
if len(x) > 1 or len(y) > 1:
    print("-1")
else:
    print(str(int(x)*int(y)))

Solution (Python):

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

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

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=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 > 9 or a < 1 or b > 9 or b < 1:
  print(str(-1))
else:
  print(str(a*b))

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

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 a >= 10 or b>= 10:
    print(-1)
else:
    print(a*b)

Solution (Python):
x,y = map(int,input().split())
if (x<1)|(9<x): print(-1)
elif (y<1)|(9<y): print(-1)
else: print(x*y)

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

Solution (Python):






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

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

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 < 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:
    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 or A<1:
    print("{}".format(-1))
else:
    if B>9 or B<1:
        print("{}".format(-1))
    else:
        print("{}".format(A*B))

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

C = A * B

if A>=10 or B>=10 :
    C = -1

print(C)

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 1 <= a <= 9 and 1 <= b <= 9:
  print (a*b)
else:
  print (-1)

Solution (Python):
get = list(map(int, input().split()))
A = get[0]
B = get[1]
if A >= 10 or B >= 10:
  print(-1)
else:
  print(A * B)

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

Solution (Python):
a, b = map(int, input().rstrip("\n").split(" "))

result = a * b

if 1 <= a <= 9 and 1 <= b <= 9:
  print(result)
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):
inps = input().split()
A = int(inps[0])
B = int(inps[1])
if(A>9 or B>9):
    print(-1)
else:
    print(A*B)

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

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

else: print(a*b)

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

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

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

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

A = int(A)

B = int(B)

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

Solution (Python):
import sys
A, B = map(int, sys.stdin.readline().split())

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

Solution (Python):
s = input().split()
A = int(s[0])
B = int(s[1])
if A <= 9 and B<= 9 and A >= 1 and B >= 1:
  multiple = A*B
else:
  multiple = -1
print(multiple)

Solution (Python):
nums = [int(e) for e in input().split()]

if (nums[0] <= 9) & (nums[1] <= 9):
  print(nums[0]*nums[1])
else:
  print(-1)

Solution (Python):
a,b=map(int,input().split())
if 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>=10 or b >= 10:
    print(-1)
else:
    print(a*b)

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

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

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

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 = [int(elem) for elem in input().split()]
if a < 10 and b < 10 and 0 < a and 0 < b:
  print(a * b)
else:
  print(-1)

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

ans = -1
if a <= 9:
    if b <= 9:
        ans = a * b
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 < 10 and 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())
print(a*b if a<=9 and b<=9 else -1)

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


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

Solution (Python):
def kuku(data):
    a = data[0]
    b = data[1]

    if a < 10 and b < 10:
        return a*b
    else:
        return -1

input_data = [int(x) for x in input().split()]

print(kuku(input_data))

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 == 0 and b // 10 == 0:
  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):
import time
st_time=time.time()

from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
ts=time.time()
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
show_flg=False
show_flg=True


a,b=MI()

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

Solution (Python):
n,m=map(int,input().split())
if (n>0 and n<10) and(m>0 and m<10):
  print(n*m)
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 >= 10 or b >= 10:
  print(-1)
else:
  print(a*b)

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


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

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

if A <= 9:
    if B <= 9:
        ans = A * B
print(ans)

Solution (Python):
s=list(map(int,input().split()))
a = s[0] 
b = s[1]
if 0 < a and a < 10 and 0<b 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(a*b)
else:
  print(-1)

Solution (Python):
x = input()

x = x.split(' ')

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

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

Solution (Python):
s = input()
if len(s) > 3:
  print(-1)
else:
  print(eval(s.replace(" ", "*")))

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

Solution (Python):
a,_,b,*c=input();print(-(c>[])or int(a)*int(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<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):
x, y = map(int, input().split())

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

Solution (Python):
A,B = (int(x) for x in 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(a*b)

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

if all(0 < n < 10 for n in (a, b)):
  print(a*b)
else:
  print(-1)

Solution (Python):

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

else:
    print(-1)

Solution (Python):

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

if 1 <= num[0] <= 9:
    if 1 <= num[1] <= 9:
        print(num[0] * num[1])
    else:
        print('-1')
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):
A, B = map(int, 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 0 < A < 10 and 0 < B < 10:
    ans = A * B
else:
    ans = -1
print(ans)

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(a*b)

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

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

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 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=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 = [int(num) for num in input().split()]

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

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

Solution (Python):
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

INF = 10 ** 10

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

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