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

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

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

Solution (Python):
import itertools

def main():
    A, B = map(int, input().split())
    if (A > 9) | (B > 9):
        print(-1)
    else:
        print(A * B)
    return 0
if __name__ == '__main__':
    main()

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

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=list(map(int,input().split()))
if a[0]>9 or a[1]>9:
	print(-1)
else:
	print(a[0]*a[1])

Solution (Python):
A, B = map(int,input().split())
if (A < 10) & (B < 10):
  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):
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 (1 <= A <= 9) and (1 <= B <= 9):
    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 = map(int,input().split())

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

Solution (Python):
"""
author : halo2halo
date : 8, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B = map(int, readline().decode('utf8').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:
    C = A*B

else:
    C = -1
print(C)

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

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

else:
	print("-1")

Solution (Python):
import sys


def solve(inp):
    (A, B) = map(int, inp.readline().strip().split(' '))

    if A >= 10 or B >= 10:
        return "-1"
    else:
        return str(A * B)


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()

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

Solution (Python):
a,b=map(int,input().split())
print(-1 if max(a,b) > 9 else 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):
import os
os.system(r"ruby -e 't=gets.split(" ").map{|i|i.to_i};print t.all?{|i|i<10}?t.inject(:*):-1'")

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

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

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math
import sys
import bisect

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

def LI(): return list(map(int, sys.stdin.readline().split()))

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a,b = LI()
    if max(a,b) > 9:
        return -1

    return a*b


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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if a<=9 and b<=9:
        print(a*b)
    else:
        print(-1)
if __name__ == '__main__':
    do()

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

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

Solution (Python):
def ints():
  return [int(x) for x in input().split()]
def ii():
  return int(input())

a, b = ints()

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

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

ans = -1

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

d = a*b

if a >= 10 or b >= 10:
    print("-1")
elif a <= 0 or b <= 0:
    print("-1")
else:
    print(d)

Solution (Python):
def main():
	
	n,k = map(int,input().split())
	
	
	
	
	
 
	if n < 10 and k < 10:
		print(int(n*k))
	else:
 		print(-1)
 
 
if __name__ == '__main__':
	main()

Solution (Python):
ans = -1

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

    if A > 0 and A < 10 and B > 0 and B < 10:
        ans = A*B
except:
    pass

print(ans)

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


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

    return a, b


def solve(a, b):
    if a < 10 and b < 10:
        return a * b
    else:
        return -1


if __name__ == '__main__':
    input = read()
    print(solve(*input))

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

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

Solution (Python):
import sys
from collections import defaultdict, deque
import bisect
from heapq import *
sys.setrecursionlimit(200000)
input = sys.stdin.readline

N, M = map(int, input().split())








if N >= 10 or M >= 10:
    print(-1)
else:
    print(N * M)

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

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):
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 = list(map(int,input().split(" ")))
if max(A) > 9:
	print("-1")
else:
	print(str(A[0] * A[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):
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 a <=9 and b <= 9:
  s = a*b
else:
  s = -1
print(s)

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 = [int(i) for i in input().split()]
if x < 10 and y < 10:
  print(x * y)
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):
data = input().split()
data_int = [int(data[i]) for i in range(2)]

if(data_int[0] >= 10 or data_int[1] >= 10):
    print(-1)
else:
    print(data_int[0] * data_int[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())
print(A*B if A<=9 and 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):
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 = input().split(" ")

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

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

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

print(s)

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

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

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

valid = range(1, 10)
if a in valid and b in valid:
    print(a*b)
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):
A,B = map(int, input().split())
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 >= 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):
a,b = map(int,input().split())

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

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

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

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

Solution (Python):
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    a, b = list(map(int, input().rstrip('\n').split()))
    if 1  <= a <= 9 and 1 <= b <= 9:
        print(a * b)
    else:
        print(-1)


if __name__ == '__main__':
    solve()

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

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

Solution (Python):
A,B = map(str,input().split())
AL = len(A)
BL = len(B)
A = int(A)
B = int(B)

if AL == 1 and BL == 1:
    print(A * B)
else:
    print(-1)

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):
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 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):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda: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)
resolve()

Solution (Python):
from sys import stdin

a,b = [int(x) for x in stdin.readline().rstrip().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=list(map(int,input().split()))
if((a[0]<=9) & (a[1]<=9)):
    print(a[0]*a[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):
a,b = map(int, input().split())
if 0<a<10 and 0<b<10:
	result = a*b
else:
	result = -1
print(result)

Solution (Python):
import sys

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

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

Solution (Python):
def main():
    a, b = [int(token) for token in 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 and B < 10:
    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 = 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):
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, 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<=9 and b<=9:
    print("{}".format(a*b))
else:
    print(-1)

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

Solution (Python):
nums = list(map(int,input().split()))
if max(nums)<=9:
    print(nums[0]*nums[1])
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 = input().rstrip().split(' ')
b = [int(j) for j in a]
if 1<=b[0]<=9 and 1<=b[1]<=9:
    print(b[0]*b[1])
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 = map(int, input().split())

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

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

ans = -1

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

Solution (Python):

N_list = []

for i in range(1,10):
    for j in range(1,10):
        N_list.append(i*j)
A_B = list(map(int, input().split()))
if A_B[0] < 10 and A_B[1] < 10:
    s = A_B[0]*A_B[1]
    if s in N_list:
        print(s)
    else :
        print("-1")
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 a<10 and b<10:
	print(a*b)
else:
	print("-1")

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

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

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

Solution (Python):
import sys
import itertools
import bisect

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  


a, b = na()

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

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

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

Solution (Python):
A,B = map(int,input().split())
if A>0 and A<10 and B>0 and B<10:
	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 <= 9 and b <= 9:
  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):
import sys

[astr, bstr] = sys.stdin.readline().split(" ")
a = int(astr)
b = int(bstr)
result = -1
if a <= 9 and b <= 9:
    result = a * b
print(result)

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

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

num = list(map(int, input().split())) 
if num[0]>9 or num[1]>9:
	print("-1")
	sys.exit()
print(num[0]*num[1])

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


if n[0] > 9 or n[1] > 9:
    print('-1');
else :
    print(n[0] * n[1]);

Solution (Python):
a,b=map(int,input().split())
if a<10and 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<=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())
ans=-1
if a>0 and a<10 and b>0 and b<10:
    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<=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())
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):
import math
import sys
input = sys.stdin.readline

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

import sys


def solve(A: int, B: int):
    if A < 10 and B < 10:
        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>9 or B>9:
    print(-1)
else:
    print(A*B)