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

Solution (Python):
x = input().split()

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

if (1 <= a <= 9) and (1<= b <= 9):
  print("{}".format(a*b))
else:
  print("{}".format(-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 and b < 10:
    print(a*b)
else:
    print(-1)

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

Solution (Python):



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




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

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

Solution (Python):
def solv(x, y):
    if (x >= 1 and x <= 9) and (y >= 1 and y <= 9):
        return x * y
    else:
        return -1

x, y = map(int, input().split(" "))
print(solv(x, y))

Solution (Python):


def solve():
    A,B = map(int, input().split())
    if A <= 9 and B<=9:
        return str(A*B)
    else:
        return '-1'    

if __name__ == '__main__':
    print(solve())

Solution (Python):




 
from collections import* 
from fractions import gcd
from functools import* 
from itertools import* 
from operator import mul,itemgetter
from bisect import* 
from heapq import* 
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)

 
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 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)
  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 >= 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 (1 <= a <= 9) & (1 <= 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())
result = -1
if a in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
    if b in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
        result = a*b
print(result)

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

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

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

Solution (Python):
A, B = map(int, input().split())
if 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 main(N):
    a, b = N.split()
    a = int(a)
    b = int(b)
    if a > 9 or a < 1:
        return -1
    if b > 9 or b < 1:
        return -1
    return a*b

if __name__ == "__main__":
    N = input()
    my_ans = main(N)
    print(my_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 a > 9 or b > 9:
  print(-1)
else:
  print(str(a*b))

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

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

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

Solution (Python):
A, B = [int(i) for i 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 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):
x, y = [int(i) for i in input().split()]

if x >= 10 or y >= 10:
  print(-1)
else:
  print(x*y)

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

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

Solution (Python):
line = [int(i) for i in input().split(" ")]
v1 = line[0]
v2 = line[1]

if 0 < v1 and v1 < 10 and 0 < v2 and v2 < 10 :
  print(str(v1*v2))
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=list(map(int,input().split()))
if N[0]>=10 or N[1]>=10:
  print(-1)
else:
  print(N[0]*N[1])

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

    if a > 0 and a < 10 and b > 0 and b < 10 :
        print(a * b)
    else:
        print(-1)
        
if __name__ == '__main__':
    ABC144_20191027_A()

Solution (Python):
num = input()
num1, num2 = num.split(" ")
num1, num2 = int(num1), int(num2)
if num1<=9 and num2<=9:
    print(num1*num2)
else:
    print(-1)

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

Solution (Python):


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

if __name__ == "__main__":
    resolve()

Solution (Python):
import sys
sys.setrecursionlimit(int(1e6))

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())
print(str(A * B if 1 <= A <= 9 and 1 <= 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):
n = [int(i) for i in input().split()]
if 1 <= n[0] <= 9 and 1 <= n[1] <= 9:
    print(n[0] * n[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())
ans=0

if A <= 9 and B <= 9 :
    ans = A*B
    print(ans)
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(j) for j in raw_input().split()]
if a<10 and a>0 and b>0 and b<10:
  print(a*b)
else:
  print(-1)

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

Solution (Python):

number = input().split(" ")

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

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


A, B = read_ints()
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 max(a,b)<=9 else -1)

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

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

print(a*b if len(str(a)) == len(str(b)) == 1 else -1)

Solution (Python):
"""
https://atcoder.jp/contests/abc144/tasks/abc144_a
"""
import numpy as np


def calc(A: int, B: int) -> int:
    if 1 <= A <= 9 and 1 <= B <= 9:
        return A * B
    return -1


def load_input_as_int_array() -> np.ndarray:
    return np.array([int(v) for v in input().split(" ")])


def main() -> None:
    A, B = load_input_as_int_array()
    result = calc(A, B)
    print(result)


main()

Solution (Python):
import sys
val1, val2 = sys.stdin.readline().rstrip().split()
val1 = int(val1)
val2 = int(val2)
if val1 > 0 and val1 < 10 and val2 > 0 and val2 < 10:
    print(val1 * val2)
else:
    print("-1")

Solution (Python):
A, B = map(int, input().split())
N = A*B
if A > 9 or B > 9:
  print("-1")
  exit()
  
for i in range(1, 10):
  for j in range(1, 10):
    if N == i*j:
      print(N)
      exit()
print("-1")

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

if(A<10 and A>0 and B<10 and B>0):
    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):
ams = 0
a,b = map(int, input().split())
if (a >=10 or b >= 10):
  ans = -1
else:
  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):
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:
    ans = a*b
else:
    ans = -1
print(ans)

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

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

C = [1,2,3,4,5,6,7,8,9]

if A in C and B in C:
    print(A*B)
else:
    print(-1)

Solution (Python):
inputStr = input().split(" ")
numList = [int(s) for s in inputStr]

if (1 <= numList[0] <= 9) and (1 <= numList[1] <= 9):
    print(numList[0] * numList[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 = (int(x) for x in input().split())

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

print(ans)

Solution (Python):
import sys

A, B = [int(x) for x in sys.stdin.readline().rstrip().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 and B < 10 and B > 0:
  C = A * B
else:
  C = -1

print(C)

Solution (Python):




import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 


a,b = [int(i) for i in 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 <= 9 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):
a, b = map(int, input().split())

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

Solution (Python):
inp=input().split()
A=int(inp[0])
B=int(inp[1])
if A < 10 and B < 10:
  print(str(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):
import sys
from collections import Counter, deque, defaultdict
from math import factorial
import heapq, bisect
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

a, b= MAP()

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

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

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

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

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


def solve(a, b):
    def check(num):
        if num > 9 or num < 1:
            return 0
        return num
    result = check(a) * check(b)
    if result == 0:
        return -1
    return result


def main():
    a, b = input_from_console()
    print(solve(a, b))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  
        check_cases()
    else:
        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 = input().split(' ')
A = int(A)
B = int(B)

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

Solution (Python):
A, B = map(int, tuple(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 < 10 and B < 10:
    print(A*B)
else:
    print(-1)

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

if A // 10 != 0 or B // 10 != 0:
  print(-1)
else:
  print(A * B)

Solution (Python):
A,B = list(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 (a<10)and(b<10)and(a>0)and(b>0):
    print(a*b)
else: 
    print(-1)

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

Solution (Python):
import sys
a, b = map(int, input().split())
k = range(1,10)
if a in k:
 if b in k:
  print(a*b)
  sys.exit()
 else:
  pass
print("-1")

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

Solution (Python):
a, b = (int(x) for x in 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 9 < A or 9 < 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 > 9 or b > 9:
    print(-1)
else:
    print(a*b)

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

if a[0]>=10 or a[1]>=10:
    print(-1)
else:
    print(a[0]*a[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):
x,y=map(int,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 and b <= 9:
  print(a*b)
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 >= 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 or b >= 10:
    print(-1)
else:
    print(a*b)

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


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

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

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

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

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

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

if a.is_integer() and a >= 1 and 9 >= a and b.is_integer() and b >= 1 and 9 >= b:
  print(int(a*b))
else:
  print(-1)

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

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

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

Solution (Python):
j=input()
i = j.split(' ')
k = []
for c in i:
    k.append(int(c))
if k[0]<10 and k[1]<10:
	print(k[0]*k[1])
else:
	print(-1)

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

Solution (Python):
import sys

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

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

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

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

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

def check(x):
  if 1<= x <=9:
    return True
  else:
    return False

if  check(A) & check(B):
  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 = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print(ans)
else :
    ans = -1
    print(ans)

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

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

digit_a = len(a)
digit_b = len(b)

if digit_a == 1 and digit_b == 1:
  answer = int(a) * int(b)
else:
  answer = -1

print(answer)

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):
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

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

Solution (Python):
n1, n2 = [int(i) for i in input().split()]

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

Solution (Python):
input_list = input().split()
nine = [1,2,3,4,5,6,7,8,9]
A = int(input_list[0])
B = int(input_list[1])
if A in nine:
    if B in nine:
        print(A*B)
    else:
        print('-1')
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 >=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>=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 >= 10:
  print(-1)
elif b >= 10:
  print(-1)
else:
  print(a*b)

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

if len(str(A)) >= 2 or len(str(B)) >=2:
        print(-1)
else:
        print(A * B)

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

for x in a:
    if(x < 1 or x > 9):
        print("-1")
        exit()
print(a[0]*a[1])

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

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

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

Solution (Python):
a,b = input().split()
c = int(a)
d = int(b)
if len(a) == 1 and len(b) == 1 :
    print(c*d)
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):
number =list(map(int, input().split()))

if (1 <= number[0] <= 9) and (1 <= number[1] <= 9):
    print(number[0] * number[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 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:
    r  = a*b
else:
    r = -1
print("{}".format(r))

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] = list(map(int, input().split()))
N = [i for i in range(1, 10)]
if A in N and B in N:
    print(A*B)
else:
    print(-1)

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

list_aaa = [1,2,3,4,5,6,7,8,9]

ans_a = 0
ans_b = 0

for i in list_aaa:
    if A == i :
        ans_a = 1
    if B == i:
        ans_b = 1
    else:
        ans = 2

if ans_a ==1 and ans_b ==1:
    print(A*B)
else:
    print('-1')

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

if i[0] >= 10 or i[1] >= 10:
    ans = -1
else:
    ans = i[0] * i[1]

print(ans)

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

Solution (Python):

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

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

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

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

Solution (Python):
import sys
 
input = sys.stdin.readline
 
a,b = (int(x) for x 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:
    print("-1")
    exit()
if B >= 10:
    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):
a,b=map(int, input().split())

if len(str(a))==1 and len(str(b))==1:
    print(a*b)
    exit()
else:
    print("-1")

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

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

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

print(result)

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

qA, modA = divmod(A, 10)
qB, modB = divmod(B, 10)

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

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

Solution (Python):
l = list(map(int, input().split()))
num = -1
fl = 0
na = float(l[0])
nb = float(l[1])
for i in l:
  if 0 < i:
    if i < 10:
      fl += 1
if fl == 2:
  num = l[0] * l[1]
print(num)

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)
elif A == 0 or B == 0:
  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):
x = list(map(int, input().split()))
a = x[0]*x[1]
if x[0]<=9 and x[1]<=9:
  print(a)
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
A,B = map(int, input().split())
if A<10:
    if B<10:
        print(A*B)
        sys.exit()
print('-1')

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

Solution (Python):


a, b = list(map( lambda x:int(x), 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:
  print(-1)
elif 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):
n,m = list(map(int,input().split()))

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

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

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

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

Solution (Python):
import sys

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