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

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

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

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

print(A*B if all(1 <= x <= 9 for x in [A, B]) 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:
	num = A * B
	print(num)
else:
	print("-1")

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

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

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



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

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

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

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

Solution (Python):
a, b = [int(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())
l = [i for i in range(10)]
if (a not in l) or (b not in l):
  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):
s=list(map(int, input().split()))
if s[0]<=9 and s[1]<=9:
  print (s[0]*s[1])
else:
  print( -1)

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

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

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

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

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

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

Solution (Python):
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *

from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
input  = sys.stdin.readline
 
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) & (b < 10):
        print(a*b)
else:
        print(-1)

Solution (Python):
a, b = map(int, input().split())
mind = [1, 2, 3, 4, 5, 6, 7, 8, 9]
if a in mind and b in mind:
    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 = [int(i) for i in input().split()]

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

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

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

Solution (Python):
a, b = [int(i) for i in 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())
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 = input().split()
A = int(A)
B = int(B)
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):
from sys import stdin

A,B = map(int,stdin.readline().strip().split())

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

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

ans=1
count=0
 
for i in data:
  if int(i)<=9:
    ans*=int(i)
  if int(i)>9:
    count+=1
    
if count>=1:
  print("-1")
elif count==0:
  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>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(str(A*B))
else:
    print(str(-1))

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

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

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

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

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

if b[0]>9 or b[1]>9:
    print(-1)
else:print(b[0]*b[1])

Solution (Python):

string=input()
string=string.split(' ')
A= int(string[0])
B= int(string[1])

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

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


def is_between(x):
    if x >= 1 and x <= 9:
        return True
    return False


def main():
    A, B = get_input()
    if is_between(A) and is_between(B):
        print(A * B)
        return
    print("-1")


main()

Solution (Python):
stdin = input()

stdin = stdin.split(' ')
a = int(stdin[0])
b = int(stdin[1])

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):
import sys
input = sys.stdin.readline
def print_ans(input_line):
    """Test Case
    >>> print_ans("2 5")
    10
    >>> print_ans("5 10")
    -1
    >>> print_ans("9 9")
    81
    """
    A,B = input_line.split()
    if len(A) == 1 and len(B) == 1:
        print(int(A) * int(B))
    else:
        print("-1")


if __name__ == '__main__':
    print_ans(input())

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):
input_num = input()
a = input_num.split()
A = int(a[0])
B = int(a[1])
if A >= 10:
  print("-1")
elif B >=10:
  print("-1")
else:
  ans = A * B
  print(ans)

Solution (Python):
from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().split()]

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

Solution (Python):
input_str = input()

each_str_array = input_str.split()




first = int(each_str_array[0])
second = int(each_str_array[1])

if(first >= 10):
  print("-1")
elif(second >= 10):
  print("-1")
else:
  print(str(first * second))

Solution (Python):

"""
Created on Wed Nov  6 21:44:44 2019

@author: over-
"""

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

Solution (Python):
import copy
import heapq
import math
import fractions

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printmultiplerow(a):
    for i in a:
        print(i)
def printrow(a):
    for i in range(len(a)-1):
        print(a[i],end = " ")
    print(a[-1])


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

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

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

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

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

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

Solution (Python):




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

Solution (Python):




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

Solution (Python):
a, b = map(int, input().split())
if a <= 9 and b <= 9:
	c = a * b
	print(c)
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=input()
b=[int(s) for s in a.split() if s.isdigit()]
if 1<=b[0]<=9 and 1<=b[1]<=9:
  print(b[0]*b[1])
else:
  print(-1)

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

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

Solution (Python):
from sys import stdin, stdout
n = stdin.readline()
num = n.split()

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

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

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

i = list(map(int, input().split()))

if (i[0] <= 9 and i[1] <= 9):
	print(i[0] * i[1])
else:
	print("-1");

Solution (Python):
a,b = map(int, input().split())
if(a<10 and b <10):
  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 = [int(i) for i in input().split()]

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

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

if A < 10 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 1<=a<10 and 1<=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 0 <= a <= 9 and 0 <= b <= 9:
    ans = a * b
else:
    ans = -1

print(ans)

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


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

Solution (Python):
import sys
read=sys.stdin.buffer.read
readline=sys.stdin.buffer.readline
readlines=sys.stdin.buffer.readlines

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

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

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

ans=0
for i in num:
  if not 0<i<10:
    ans=-1
if ans==-1:
  print(ans)
else:
  print(num[0]*num[1])

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


if a//10!=0:
    print(-1)

elif b//10!=0:
    print(-1)

else:
    print(a*b)

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

Solution (Python):
A, B = [int(i) for i in input().split()]
if A >= 10 or B >= 10:
    print(-1)
else:
    print(A * B)

Solution (Python):
def is_valid_input(num: int) -> bool:
    return 1 <= num <= 9


ab = list(map(int, input().split()))
A = ab[0]
B = ab[1]

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

Solution (Python):


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

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

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

Solution (Python):



def main():
    a, b = input_line(int, int)
    if a > 9 or b > 9:
        print(-1)
    else:
        print(a * b)


def input_line(*types):
    if len(types) == 1:
        return types[0](input())
    else:
        return [t(x) for t, x in zip(types, input().split())]


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

Solution (Python):
import sys

A, B = map(int, sys.stdin.read().split())

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

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())
print(a * b if max(a, 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 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(_) for _ in input().split()]

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

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

Solution (Python):


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

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

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

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

Solution (Python):

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

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

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

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

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

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

ch = 1

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

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


def p_b():
    pass


def p_c():
    pass


def p_d():
    pass


def p_e():
    pass


def p_f():
    pass


if __name__ == '__main__':
    p_a()

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

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

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

if a not in checked or b not in checked:
    print("-1")
else:
    print(str(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 1<=a<=9 and 1<=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 = list(map(int,input().split()))

if (a[0]<=9 and a[1]<=9):
	print(a[0]*a[1])
else:
	print("-1")

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

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


MOD = 10 ** 9 + 7

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

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

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

if a < 10 and b < 10:
    print(str(int(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(a*b)
else:
    print(-1)

Solution (Python):
from heapq import heappush, heappop
from collections import deque
import re
import math
import functools

def s_raw():
    return input().rstrip("\r")

def int_raw():
    return int(input())


def ss_raw():
    return input().split()


def ints_raw():
    return list(map(int, ss_raw()))


INF = 1 << 29


def make1d_arr(n, val=INF):
    return [val for i in range(n)]


def make2d_arr(h, w, val=INF):
    return [[val for i in range(w)]for i in range(h)]


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


def BFord(n,es):
    v_cost = [INF]*n
    v_cost[0] = 0
    for v in range(n*2):
        for e in es:
            frm = e[0]
            to = e[1]
            if v_cost[to] > v_cost[frm]+e[2]:
                v_cost[to] = v_cost[frm]+e[2]
                if v >= n:
                    v_cost[to] = -INF
        if v == n-1:
            prev = v_cost[:]
    v_cost = [-INF if prev[idx]!=v_cost[idx] else v_cost[idx] for idx in range(n)]
    return v_cost
    
def ZAlgo(s):
    l = len(s)
    A = [0]*l
    i =1
    j =0
    A[0]=l
    while i<l:
        while i+j<l and s[j] == s[i+j]:
            j+=1
        if j==0:
            i+=1
            continue
        A[i]=j
        k=1
        while (i+k<l) and (k+A[k]<j):
            A[i+k] =A[k]
            k+=1
        i+=k
        j-=k
    return A


def main():
    A,B = ints_raw()
    if A>0 and A<10 and B>0 and B<10:
        return A*B
    else:
        return -1


if __name__ == "__main__":
    print(main())

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

Solution (Python):
import sys


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


if __name__ == '__main__':
    solve()

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

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

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

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

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

Solution (Python):
a, b = map(int, input().split())
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 0<a<10 and 0<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('{}'.format(a*b))

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


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

else:
    print(-1)

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

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

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

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

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

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

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

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

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

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

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

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

Solution (Python):
n, m = tuple([int(i) for i in input().split(" ")])
print(n * m * int(n < 10 and m < 10) - int(not(n < 10 and m < 10)))

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

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


if  0 < int(s[0]) < 10 and 0 < int(s[1]) < 10:
    i = int(s[0]) * int(s[1])   
    print(i)
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(-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().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:
  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):
s = input()
l = [int(x) for x in s.split(' ')]
a, b = l
if ((a <= 9) and (b <= 9)): print(a*b)
else: print(-1)

Solution (Python):
aa, bb = input().split()
if int(aa)<10 and int(bb)<10 :
  print(int(aa)*int(bb))
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):
lst = list(map(int, input().split()))
if lst[0] >= 10 or lst[1] >= 10:
    print('-1')
else:
    num = lst[0] * lst[1]
    print(num)

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<=9 and b<=9) 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):
inp = input().split(" ")
if len(inp[0]) == 1 and len(inp[1]) == 1:
  print(int(inp[0]) * int(inp[1]))
else:
  print(-1)

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

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

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

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

if A <= 0 or 9 < A or B <= 0 or 9 < B:
    print(-1)
    exit()

print(A*B)

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

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

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())
print("{}".format(A*B if (1 <= A <= 9 and 1 <= B <= 9) else -1))

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

if(a<10 and b<10):

  c=a*b
  
else:

 c=-1
 
print (c)

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

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

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

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

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