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):
words = lambda t : list(map(t, input().split()))
a,b = words(int)

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

Solution (Python):
def read_values():
    return map(int, input().split())


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


def f():
    a, b = read_values()
    if 1 <= a <= 9 and 1 <= b <= 9:
        print(a * b)
    else:
        print(-1)


if __name__ == '__main__':
    f()

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 max(A) > 9:
  print(-1)
else:
  print(A[0] * A[1])

Solution (Python):
a,b=[int(i) for i in 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 = [list(map(int, s.split())) for s in open(0)][0]
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<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 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):
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
  a, b = na()
  if a > 9 or b > 9:
    print(-1)
    return
  print(a * b)

main()

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

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

Solution (Python):
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

a,b = IL()
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):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

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

Solution (Python):

import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

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

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

A, B = [int(x) for x in stdin.readline().rstrip().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):


def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  A, B = readInts()

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

if __name__ == "__main__":
  main()

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

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

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

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

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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
A,B=map(int,input().split())
if A<10 and B<10:
    print(A*B)
else:
    print(-1)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

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


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

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))



A,B = II()

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

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

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


def main():
    import math
    import collections
    import itertools

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



if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]








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

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

Solution (Python):

import sys


def solve(A: int, B: int):
    if 1<=A<=9 and 1<=B<=9:
        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):
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = MAP()
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 in range(10) and B in range(10) else -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 < 10 and B < 10:
    print(A*B)
else:
    print(-1)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, atan2
from operator import mul
from functools import reduce
sys.setrecursionlimit(10**8)

INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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

Solution (Python):

from collections import  Counter

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

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

Solution (Python):
from fractions import gcd
from datetime import date, timedelta
from heapq import*
import math
from collections import defaultdict, Counter, deque
import sys
from bisect import *
import itertools
import copy
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7


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



    
            
    

    

    

if __name__ == '__main__':
    main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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

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

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

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

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

Solution (Python):

import sys
INF = float("inf")


def solve(A: int, B: int):
    if (1 <= A <= 9) and (1 <= B <= 9):
        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 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):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7

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

Solution (Python):
from collections import Counter,defaultdict,deque
import sys,bisect,math,itertools,string,queue
from heapq import heappop, heappush
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

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

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

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

Solution (Python):
import sys
from heapq import heappop, heappush
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7
INF = float('inf')

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


sol()

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

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import bisect
import sys
input = sys.stdin.readline

setrecursionlimit(1000000)

dp = defaultdict(lambda x:-1)

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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    a,b = LI()
    if 1 <= a <= 9 and 1 <= b <= 9:
        print(a*b)
    else:
        print(-1)
    return


if __name__ == "__main__":
    solve()

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

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

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