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















































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    A, B = list(map(int, lines[0].split()))
    
    
    
    
    
    
    
    

    if A > 9 or B > 9:
        result = -1
    else:
        result = A*B

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2 5']
        lines_export = [10]
    if pattern == 2:
        lines_input = ['5 10']
        lines_export = [-1]
    if pattern == 3:
        lines_input = ['9 9']
        lines_export = [81]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

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

Solution (Python):
import math
import collections
import fractions
import itertools
import functools
import operator

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

if __name__ == "__main__":
    solve()

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

Solution (Python):

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

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

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

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Solution (Python):

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



ans = 0

if (a < 1 or a > 9) or (b < 1 or b > 9):
    ans = -1
else:
    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 len(str(A)) == 1 and len(str(B)) == 1:
  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=[int(i) for i in 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<=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):
def resolve():
    A, B = list(map(int, input().split()))
    if A >= 10 or B >= 10:
        print(-1)
    else:
        print(A*B)

if '__main__' == __name__:
    resolve()

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

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>9)|(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())

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

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

if not ( 1 <= A <= 20 ): sys.exit()
if not ( 1 <= B <= 20 ): sys.exit()
if not (isinstance(A,int) and isinstance(B,int)): sys.exit()

print(A*B) if A <= 9 and B <= 9 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 = 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 < 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()) 
l = [1,2,3,4,5,6,7,8,9]

if a in l and b in l:
    print(a*b)
else:
    print('-1')

Solution (Python):
numz = input()
count = 0
numz_pair = numz.split(" ")
numz_pair = list(map(int, numz_pair))

for i in range(len(numz_pair)):
    if numz_pair[i] <= 9:
        count = count + 1
    else:
        print(-1)
        break

if count == len(numz_pair):
    print(numz_pair[0]*numz_pair[1])

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

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

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

Solution (Python):
a, b = [int(i) for i 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 or b >= 10:
  print(-1)
else:
  print(a * b)

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

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):
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 in range(1,10) and B in range(1,10):
    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 10 <= a or 10 <= b:
    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 = list(map(int, input().split()))

print(a * b if a < 10 and b < 10 else -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())
print(-1 if any(True if x > 9 else False for x in (a, b)) else 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(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 = 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 (a < 10 and b < 10):
  print(a*b)
else:
  print(-1)

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

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

Solution (Python):
N,M=map(int,input().split())
if N<10 and M <10:
  print(N*M)
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 = [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())
ans = -1
if a <= 9 and b <= 9:
    ans = a*b
print(ans)

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

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

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

Solution (Python):


import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")

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

if __name__ == "__main__":
    main()

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

Solution (Python):
s = raw_input()
s = s.split(' ')

a, b = int(s[0]), int(s[1])

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

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

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

print mul(a,b)

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

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

print(mul(a,b))

Solution (Python):
s = raw_input()
n1,  n2 = s.split()
n1 = int(n1)
n2 = int(n2)
flag = True
if n1 < 0 or n1 > 9:
	flag = False
if n2 < 0 or n2 > 9:
	flag = False
if flag:
	print n1 * n2
else:
	print -1

Solution (Python):

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

count = (1,2,3,4,5,6,7,8,9)

if a not in count or b not in count:
    print(-1)
else:
    print(a * b)

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

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

A,B = list(input().rstrip().split())
print( -1 if len(A) >1 or len(B) > 1 else eval(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 main():
    a, b = map(int, input().split())
    if 10 > a and 10 > b:
        print(a*b)
    else:
        print("-1")


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):



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



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

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

Solution (Python):
n,m = input().split()
n,m = int(n) , int(m)
if n<=9 and m<=9:
    print(n*m)
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,*c=input()
print(-(c>[])or int(a)*int(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 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 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())
res = a * b if (a < 10 and b < 10) else '-1'
print(res)

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

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

A = int(A)

B = int(B)

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

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

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

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 and B < 10:
    ans = A * B
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):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re











import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
a,b = readInts()
print(a*b if (1 <= a <= 9 and 1 <= b <= 9) else '-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):




import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

a,b=MI()
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<=9 and b<=9 else -1)

Solution (Python):
import sys




def main():
    A,B = map(int,input().split())
    if A//10 +B//10 >0:
        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())
print(a*b if a<=9 and 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 = list(map(int, input().split()))
if (a<1) or (a>9) or (b<1) 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 9 < A or 9 < B:
    print(-1)
else:
    print(A * B)

Solution (Python):

a, b = map(int, input().split())
print(a * b * (a < 10 and b < 10) or -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 = [int(a) for a in input().split()]
if a>9 or b>9:
  print(-1)
elif 1<=a<=9 and 1<=b<=9:
  print(a*b)

Solution (Python):
a,b = input().split()
if len(a) + len(b) == 2:
    print(int(a) * int(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):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    A, B = map(int, readline().split())
    if A < 10 and B < 10:
        print(A * B)
    else:
        print(-1)

    return


if __name__ == '__main__':
    main()

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

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

Solution (Python):
def main():
    a, b = map(int, input().split())
    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 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)
    exit()
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<=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 = input().split()
a = int(a)
b = int(b)
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):
x,y=map(int,input().split())
if x > 9 or y > 9:
    print('-1')
else:
    print(x*y)

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

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

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

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

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

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

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

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

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

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):
import sys

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

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

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  
def LS2(): return list(sys.stdin.readline().rstrip())  

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

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

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

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

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

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 > 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):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

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

Solution (Python):


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

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

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

Solution (Python):
a1=input()
a2=[i for i in a1.split()]
x,y=float(a2[0]),float(a2[1])
v,v1=x.is_integer(),y.is_integer()
if 1<=x<=20 and 1<=y<=20 and v==v1==True:
    if 1<=x<=9 and 1<=y<=9:
        print(int(x*y))
    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 = (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)
  exit()
print(A*B)

Solution (Python):
a,b = map(int,input().split())
if a<=9 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):
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n = list(input().split())
    if len(n[0]) == 1 and len(n[1]) == 1:
        print(int(n[0])*int(n[1]))
    else:
        print(-1)
    
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 = 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 (1<=a<=9)&(1<=b<=9):
    print(a*b)
else:
    print("-1")

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

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

Solution (Python):
A, B = [int(s) for s in input().split(' ')]
a = 0 if A > 9 else A
b = 0 if B > 9 else B
print(a * b if a * b else -1)

Solution (Python):
import os, sys, re, math

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

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

Solution (Python):

A = [int(s) for s in input().split()]
print(A[0] * A[1] if sum(map(lambda x: 1 <= x <= 9, A)) == 2 else -1)

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

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

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

Solution (Python):
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
a=mi()
ans=1
for i in a:
  if 1<=i<=9:
    ans*=i
  else:
    print(-1)
    sys.exit()
print(ans)

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

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

if __name__ == '__main__':
    solve()

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())

ok = 1 <= A <= 9
ok = ok and (1 <= B <= 9)

print(A * B if ok 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 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) 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)
    exit()
else:
    print(a*b)

Solution (Python):
from collections import Counter 
from collections import defaultdict
from collections import deque
from functools import reduce
import math
import itertools
import heapq
import numpy as np
import bisect
import sys

sys.setrecursionlimit(10**6)


def bfs(s,n,node):
    
    check=[False for _ in range(n)]
    check[s]=True
    
    queue=deque([s])
    visited_num=1

    
    
    color=[-1 for _ in range(n)]
    color[s]=0
    
    while visited_num<n:
        
        if len(queue)==0:
            
            
            return color

        now_vertex=queue.popleft()
        
        for next_vertex in node[now_vertex]:


            if check[next_vertex]==True:
                continue

            queue.append(next_vertex)
            check[next_vertex]=True

            
            color[next_vertex]=color[now_vertex]+1
            visited_num+=1

    return color




ceil=lambda x,y: (x+y-1)//y
input_list = lambda : list(map(int,input().split()))




n,m=input_list()

if n>9 or m>9:
    print(-1)
    exit()

print(n*m)

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

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

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