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



Sample input:
2 5


Sample output:
10

Submission status: Accepted

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

product = a * b

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = (int(num) for num in input().split())
if A>9  or B>9:
    print(-1)
else:
    print(A*B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if a<10 and b<10:
  print(a*b)
else:
  print(0-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nums = [int(e) for e in input().split()]
if nums[0] < 10 and nums[1] < 10:
    print(nums[0] * nums[1])
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ab = input()
a, b = ab.split(" ")
A = int(a)
B = int(b)

if "0" in a or "0" in b or A > 9 or B > 9:
    print(-1)
else:
    print(A * B)

Submission status: Accepted

Solution code:
# A - 9x9
a,b = map(int, input().split())
if a<10 and b<10:
    print(a*b)
else:
    print(-1)

Submission status: Accepted

Solution code:
n=[int(x) for x in input().split()]

ans = -1
if n[0]>9:
    print(-1)
elif n[1]>9:
    print(-1)
else:
    print(n[0]*n[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


class Input():
    def __init__(self):
        self.line = input()

    def number(self):
        return int(self.line)

    def numbers(self):
        array = self.line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def strings(self):
        return self.line.split(' ')


def main():
    ipt = Input()
    ab = ipt.numbers()
    a = ab[0]
    b = ab[1]

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


main()

Submission status: Accepted

Solution code:
#!/usr/bin/python3

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=[int(x) for x in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if A < 10 and B < 10:
    print("{}".format(A*B))
else:
    print("-1")

Submission status: Accepted

Solution code:
from sys import stdin
input = [int(x) for x in stdin.readline().split()]
input_ys = [x for x in input if x < 10]
#print(input_ys)
if len(input_ys) == 2:
    print(input_ys[0] * input_ys[1])
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
out = input().split()
a = int(out[0])
b = int(out[1])

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

Submission status: Accepted

Solution code:
x, y = input().split()
if len(x) > 1 or len(y) > 1:
    print("-1")
else:
    print(str(int(x)*int(y)))

Submission status: Accepted

Solution code:
# coding: utf-8
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" )

Submission status: Accepted

Solution code:
num = input().split()
A = int(num[0])
B = int(num[1])

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
a,b=input().split()
a,b=[int(a),int(b)]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
if (x<1)|(9<x): print(-1)
elif (y<1)|(9<y): print(-1)
else: print(x*y)

Submission status: Accepted

Solution code:
A, B = input().split()
ans = -1
if len(A) == 1 and len(B) == 1:
    ans = int(A) * int(B)
print(ans)

Submission status: Accepted

Solution code:
# # 整数の入力
# a = int(input())
# # スペース区切りの整数の入力
# b, c = map(int, input().split())
# # 文字列の入力
# s = input()
a,b = map(int, input().split())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int, input().split())
if A>9 or A<1:
    print("{}".format(-1))
else:
    if B>9 or B<1:
        print("{}".format(-1))
    else:
        print("{}".format(A*B))

Submission status: Accepted

Solution code:
A,B= (int(x) for x in input().split())

C = A * B

if A>=10 or B>=10 :
    C = -1

print(C)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
get = list(map(int, input().split()))
A = get[0]
B = get[1]
if A >= 10 or B >= 10:
  print(-1)
else:
  print(A * B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().rstrip("\n").split(" "))

result = a * b

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inps = input().split()
A = int(inps[0])
B = int(inps[1])
if(A>9 or B>9):
    print(-1)
else:
    print(A*B)

Submission status: Accepted

Solution code:
inps = input().split()
a = int(inps[0])
b = int(inps[1])

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

else: print(a*b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = input().split()

A = int(A)

B = int(B)

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

Submission status: Accepted

Solution code:
import sys
A, B = map(int, sys.stdin.readline().split())

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

Submission status: Accepted

Solution code:
s = input().split()
A = int(s[0])
B = int(s[1])
if A <= 9 and B<= 9 and A >= 1 and B >= 1:
  multiple = A*B
else:
  multiple = -1
print(multiple)

Submission status: Accepted

Solution code:
nums = [int(e) for e in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
arr = input().split()
a = int(arr[0])
b = int(arr[1])

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

Submission status: Accepted

Solution code:
def kuku(data):
    a = data[0]
    b = data[1]

    if a < 10 and b < 10:
        return a*b
    else:
        return -1

input_data = [int(x) for x in input().split()]

print(kuku(input_data))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import time
st_time=time.time()

from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
ts=time.time()
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
show_flg=False
show_flg=True


a,b=MI()

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
if (n>0 and n<10) and(m>0 and m<10):
  print(n*m)
else:
  print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


if N[0]<10 and N[1]<10:
 print(N[0]*N[1])
else: 
 print(-1)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
ans = -1

if A <= 9:
    if B <= 9:
        ans = A * B
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()

x = x.split(' ')

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

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

Submission status: Accepted

Solution code:
a,_,b,*c=input();print(-(c>[])or int(a)*int(b))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x, y = map(int, input().split())

if x < 10 and y < 10:
	print(x * y)
else:
	print(-1)

Submission status: Accepted

Solution code:
A,B = (int(x) for x in input().split())
if A >=10 or B >=10:
	print(-1)
else:
    print(A*B)

Submission status: Accepted

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

Submission status: Accepted

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

if all(0 < n < 10 for n in (a, b)):
  print(a*b)
else:
  print(-1)

Submission status: Accepted

Solution code:

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

else:
    print(-1)

Submission status: Accepted

Solution code:
# 入力された数値を格納
num = list(map(int, input().split()))

if 1 <= num[0] <= 9:
    if 1 <= num[1] <= 9:
        print(num[0] * num[1])
    else:
        print('-1')
else:
    print('-1')

Submission status: Accepted

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


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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = (int(i) for i in input().split())  
if (A>9) or (B>9):
    print("-1")
else:
    print(A*B)

Submission status: Accepted

Solution code:
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

INF = 10 ** 10

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(A*B if all(1 <= x <= 9 for x in [A, B]) else -1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
number = list(map(int, input().split()))
#print(number[0])
#print(number[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *
# from math 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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input  = sys.stdin.readline
 
A,B = map(int,input().split())
if A>9 or B>9:
  print(-1)
else:
  print(A*B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

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

Submission status: Accepted

Solution code:
a,b = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:

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)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# スペース区切りの整数の入力
a, b = map(int, input().split())

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

Submission status: Accepted

Solution code:
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())

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
input_str = input()

each_str_array = input_str.split()

# input_strが"1 2"の場合、
# each_str_array = ["1", "2"]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#import os 
#import sys
#print(sys.path)
#print('hello')
a,b=(int(x) for x in input().split())
if a>=10 or b>=10:
    print(-1)
else:
    print(int(a*b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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