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-----
2 5

-----Sample Output-----
10

2 \times 5 = 10.

Difficulty: introductory

Starter code:

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

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

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

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

else:
    print("-1")

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

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

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


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

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

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

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



A, B = map(int, input().split())
print(A * B) if len(str(A)) == 1 and len(str(B)) == 1 else print(-1)

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

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

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

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

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

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

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

a,b=map(int,input().split());print([-1,a*b][a<10 and b<10])

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

a, b = [int(n) for n in input().split()]
print(a*b if 1 <= a <= 9 and 1 <= b <= 9 else '-1')

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

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

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

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

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

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

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

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

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

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


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


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

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

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

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

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

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

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


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

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

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

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


def mult(a, b):
    if a > 9 or b > 9 or a < 1 or b < 1:
        print(-1)
    else:
        print(a * b)

mult(a,b)

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

print(multiply(*map(int, input().split())))

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

if 1 <= A <= 9 and 1 <= B <= 9:
  total = A * B
else:
  total = -1

print(total)

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

A, B = [int(n) for n in input().split()]
print(A*B if A<=9 and B<=9 else -1)

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


#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(500000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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


def main():
    solve()


def __starting_point():
    main()

__starting_point()

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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



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

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

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

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

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

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

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


a, b = [int(i) for i in input().split()]
if a > 9 or b > 9:
  print(-1)
else:
  print(a*b)

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

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

#144-A

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

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

else:
    print((-1))


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

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

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

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

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

a, b = input().split()

a1 = len(a)
b1 = len(b)

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

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

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

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

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

# A, Bがともに9以下であるかどうかで場合分け
if A<=9 and B<=9: print(A*B)
else: print(-1)

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

a, b = map(int, input().split())
if a // 10 != 0 or b // 10 != 0:
    print(-1)
else:
    print(a*b)

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

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

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

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


S=input().replace(' ','*');print([-1,eval(S)][len(S)<4])

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

N = list(map(int, input().strip().split()))
state=-1
if(N[0]>=1 and N[0] <=9 and N[1]>=1 and N[1] <=9):
  state=N[0]*N[1]
print(state)

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

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

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

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

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


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

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

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

l=list(map(int,input().split()))
a=l[0]
b=l[1]
if(a>9 or a<1 or b>9 or b<1):
  print(-1)
else:
  print(a*b)

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

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

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

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

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

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

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

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

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

import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

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

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


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

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

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

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