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


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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


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


if __name__ == '__main__':
    resolve()

Solution (Python):






from collections import defaultdict











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

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    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())
ans = A*B
if A > 9 or B > 9:
  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):
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



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

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

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

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

Solution (Python):
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

a,b=mi()

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
input = sys.stdin.readline
from collections import *

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

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

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

Solution (Python):
def main():
    A, B = map(int, input().split())
    if A > 9 or B > 9:
        print(-1)
        exit(0)
    else:
        print(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)

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

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

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

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

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

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

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

Solution (Python):
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") 

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

Solution (Python):

"""
A - 9x9
https://atcoder.jp/contests/abc144/tasks/abc144_a

"""
import sys


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


def main(args):
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

ans = a * b
if a > 9 or b > 9: ans = -1

print(ans)

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

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

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

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

Solution (Python):
a,b = map(int, input().split())
aa = a if a < 10 else 0
bb = b if b < 10 else 0

print(-1 if aa*bb == 0 else aa*bb)

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

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

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

ans = A*B

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

Solution (Python):
a,b = (int(x) for x in 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):
import sys
import decimal 

def input():
    return sys.stdin.readline().strip()

def main():
    a, b = map(int, input().split())
    if a >= 10 or b >= 10:
        print(-1)
        return
    print(a*b)
    
    
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=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)
    exit()
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):
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from math import factorial, sqrt, ceil
from functools import lru_cache, reduce
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def dijkstra_heap(s, edge, n):
    
    d = [10**20] * n
    used = [True] * n 
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


def gcd_list(numbers):
    return reduce(gcd, numbers)


def is_prime(n):
    if n <= 1:
        return False
    p = 2
    while True:
        if p ** 2 > n:
            break
        if n % p == 0:
            return False
        p += 1
    return True



def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P


def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret



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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)

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

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

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

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

Solution (Python):
a, b = 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())

if 1<= A <= 9 and 1 <= B <= 9:
    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())
print(-1 if a>9 or 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().strip().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<=9:
    if b<=9:
        print(a*b)
    else:
        print("-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):
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 >= 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 1 <= A <= 9 and 1 <= 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(int, raw_input().split(' '))
res = a * b * (1 if a < 10 and b < 10 else 0)
print res if res 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 A==0 or A>=10 or B==0 or B>=10:
  print(-1)
else:
  print(A*B)

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

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

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

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

    print(a*b)

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

input = lambda: sys.stdin.readline().rstrip()


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

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

Solution (Python):
def kuku(a, b):

    return a*b if max(a, b) < 10 else -1
def main():
    a, b = map(int, input().split())
    print(kuku(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 > 9 or b > 9:
    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(str(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 and b <= 9:
  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):

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


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


if __name__ == '__main__':
    main()

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

if N[0] > N[1]:
  if N[0] > 9:
    print(-1)
  else:
    print(N[0]*N[1])
else:
  if N[1] > 9:
    print(-1)
  else:
    print(N[0]*N[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 > 0 or B // 10 > 0:
    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):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    a, b = map(int, input().split())

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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

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

Solution (Python):
x = input().split()
a = int(x[0])
b = int(x[1])
if a <= 9 and b <= 9:
  print(a * b)
else:
  print('-1')

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

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

print(a*b if len(str(a)+str(b))<3 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 b<10 and a<10:
  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 >= 10 or B >= 10:
    print(-1)
    exit()

ans = A * B
print(ans)

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

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

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 = 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):
import sys
sys.setrecursionlimit(10**6)
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=[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 <= 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 b<=9:
  print(a*b)
else:
  print(-1)

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a,b = nm()

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

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

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

print(ans)

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

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

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

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

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

Solution (Python):
import sys
from collections import Counter
from collections import deque
import math
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

Solution (Python):
import sys
def ISI(): return map(int, sys.stdin.readline().rstrip().split())

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

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

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

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

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

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

Solution (Python):

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

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

print(a[0]*a[1] if a[0] <= 9 and a[1] <= 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 <= 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 = list(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())
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 max(a,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())
print(a*b if a<=9 and b<=9 else -1)

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

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

if(len(str(x[0])) < 2 and len(str(x[1])) < 2):
  print(x[0] * x[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 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):
x = input().split()
a = int(x[0])
b = int(x[1])

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 sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))

mod = 998244353

A, B = rl()

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