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

answer = -1

if 1 <= A and 9 >= A and 1 <= B and 9 >= B:
  answer = A * B

print(answer)

Submission status: Accepted

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

#複数入力
n,m=(int(x) for x in input().split())
l=[_ for _ in range(1,10)]
if n not in l or m not in l:
    print(-1)
else :
    print(n*m)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

myfunc(a,b)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

else:
  x = -1

print(x)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if 0<a<10 and 0<b<10:
  c=a*b
  print(c)
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=input().split()
x=-1
a2=int(a)
b2=int(b)
if (0<a2<10) and (0<b2<10):
  print(a2*b2)
else:
  print(x)

Submission status: Accepted

Solution code:


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


good = True

if a>=10 or b>=10:
  good = False

if good:
  print(a * b)
else:
  print(-1)

Submission status: Accepted

Solution code:
num_0,num_1 = map(int,input().split())

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

Submission status: Accepted

Solution code:
#coding:shift_jis
test = list(input().split())
for i in range(len(test)):
    test[i] = int(test[i])

if test[0] >= 10 or test[1] >= 10:
    print(-1)

elif test[0] < 1 or test[1] < 1:
    print(-1)

else:
    print(test[1] * test[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
    print(-1)
    exit()
    
elif b>9:
    print(-1)
    exit()

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 = [int(x) for x in input().split()]
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())
C = A*B
if 0<A<10:
    if 0<B<10:
        C = A*B
    else:
        C = -1
else:
    C = -1
print(C)

Submission status: Accepted

Solution code:
inp = input().split()

A = int(inp[0])
B = int(inp[1])

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

Submission status: Accepted

Solution code:
def main(a, b):
    if a>9:
        return -1
    if b>9:
        return -1
        
    return a*b

inp = input().split();
a = int(inp[0])
b = int(inp[1])
print(main(a,b))

Submission status: Accepted

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

Submission status: Accepted

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

if (s[0] >=10 or s[1]>=10):
	print(-1)
else:
	print(s[0]*s[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())

def check(test):
    if((test <= 0) or (10 <= test)):
        print(-1)
        exit(0)
    else:
        return test


a = check(a)
b = check(b)

print(a*b)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
A, B = [int(_) for _ 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:
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:
n,k=map(int,input().split())
s1=str(n)
s2=str(k)
if(len(s1)==1 and len(s2)==1):
  print(n*k)
else:
  print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
print( n * m if n < 10 and m < 10 else -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(i) for i 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 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 = map(int, input().split())
print(-1 if max(A,B)>=10 else A*B)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if 1 <= a < 10 and 1 <= b < 10:
  print("{}".format(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 (1<=a & a<=9) & (1<=b & b<=9):
  print(a*b)
else:
  print(-1)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# 2019/10/29

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

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

else :
    print(-1)

Submission status: Accepted

Solution code:
A,B = map(int,raw_input().split())
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:
s = input().split()

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

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

Submission status: Accepted

Solution code:
N,M = map(int,input().split())
ans = N * M
if N >= 10 or M >= 10:
  ans = -1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
print(A * B if 1 <= A <= 9 and 1 <= 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:
import fileinput
import re

for line in fileinput.input():
    A = int(re.search("^[0-9]+", line).group())
    B = int(re.search("[0-9]+$", line).group())
    if(A < 10 and A >=1 and B < 10 and B >= 1):
        print(A*B)
    else:
        print(-1)
    exit()

Submission status: Accepted

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

if 0 <= x <= 9 and 0 <= y <= 9:
  print(x*y)
else:
  print('-1')

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
num = [1,2,3,4,5,6,7,8,9]
if a in num and b in num:
    print(a * b)
else:
    print("-1")

Submission status: Accepted

Solution code:
n,m=map(str,input().split())
if(len(n)<=1 and len(m)<=1):
	print(int(n)*int(m))
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:
n,m=map(int, input().split())
if(n>9 or m>9):
    print("-1")
else:
    print(m*n)

Submission status: Accepted

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

Submission status: Accepted

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

if 1 <= a and a <= 9 and 1 <= b and b <= 9:
  print("{}".format(a * b))
else:
  print(-1)

Submission status: Accepted

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

if min(A,B) <= 0 or max(A,B) >=10:
    print(-1)
else:
    print(A*B)

Submission status: Accepted

Solution code:
A,B=map(str,input().split())
if (len(A)<=1) & (len(B)<=1):
  print(int(A)*int(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:
from enum import Enum
from queue import Queue

import numpy as np

import collections
import bisect
import sys
import math

from scipy.sparse.csgraph import floyd_warshall

BIG_NUM = 200000000000
MOD = 1000000007
EPS = 0.000000001

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

Submission status: Accepted

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


main()

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,*c=input();print(-(c!=[])or int(a)*int(b))

Submission status: Accepted

Solution code:
def product(x,y):
    if (x > 9 or y > 9):
        print('-1')
    else:
        ans = x * y
        print(str(ans))

a = input().split()
product(int(a[0]),int(a[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:
def main():
    a,b = map(int, input().split())
    print(a * b if a < 10 and b < 10 else "-1")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
N=input()
list = N.split()

A = int(list[0])
B = int(list[1])

if A < 10 and B < 10:
  print(A*B)

else:
  print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = [int(_) for _ in input().split()]
ok = range(1, 10)
if A in ok and B in ok:
    print(A * B)
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
AB = 1
for i in map(int,input().split()):
  if i<10 and AB>0: AB *= i
  else: AB = -1
print(AB)

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())
ans = a*b
if a<10 and a>0 and b>0 and b<10:
    print(ans)
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:
# 1行目の入力を空白で分割された数値として扱う
a, b = map(int, input().split())

# 10以上の場合-1
res = a * b
if a > 9:
    res = -1
if b > 9:
    res = -1

# 答えの出力
print(res)

Submission status: Accepted

Solution code:
A, B = [int(i) for i in 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 >= 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 len(str(a)) == 1 and len(str(b)) == 1:
	print(a*b)
else:
	print(-1)

Submission status: Accepted

Solution code:
A,B = [int(x) for x in 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 (A>=10)or(B>=10):
  print("-1")
else:
  print(A*B)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect
 
 
sys.setrecursionlimit(1000000000)
def input():
    return sys.stdin.readline().strip()
 
def iinput():
    return int(input())
 
def finput():
    return float(input())
 
def tinput():
    return input().split()
 
def rinput():
    return map(int, tinput())
 
def rlinput():
    return list(rinput())
 
def modst(a, s):
    res = 1
    while s:
        if s % 2:
            res *= a
        a *= a
        s //= 2
    return res

 
def main():
    a, b = rinput()
    if a >= 10 or b >= 10:
        print(-1)
    else:
        print(a * b)
main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
"""
制約
1≦A≦20
1≦B≦20
"""

#入力
A, B = map(int,input().split()) #複数の入力はmap関数
 
#判別＆出力
if A <= 9 and B <= 9:
  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 = 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 and a <= 9:
    if 1 <= b and b <= 9:
        print(a*b)
    else:
        print(-1)
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc144/tasks/abc144_a
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


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

    print(a * b)

if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

Solution code:
A,B=input().split()
if len(A) < 2 and len(B) < 2:
  print(int(A)*int(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:
L=list(map(int,input().split()))
if any(l>9 for l in L):
  print(-1)
else:
  print(L[0]*L[1])

Submission status: Accepted

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

Submission status: Accepted

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

print(a*b if len(s)<4 else -1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B= [int(i) for i in input().split()]
print(A*B if A<10 and B<10 else -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:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    A,B = inputMap()
    if A >= 10 or B >= 10:
        print(-1)
        sys.exit()
        
    print(A*B)
    
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import numpy as np
given = np.array( list( map( int, input().split() ) ) )

if all( (given <= 9) & (given >= 1) ):
  result = np.prod( given )
else:
  result = -1

print( result )

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc144a

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

Submission status: Accepted

Solution code:
def solve(a, b):
    if (a > 9) or (b > 9):
        return -1
    else:
        return a * b

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC144A - 9x9
def main():
    A, B = map(int, input().split())
    ans = A * B if max(A, B) <= 9 else -1
    print(ans)


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]

A, B = MAP()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y=[int(x) for x in input().split()]
print((-1,X*Y)[max(X,Y)<=9])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a*b if len(str(a)) == len(str(b)) == 1 else '-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:
"""
author : dokueki
"""
a,b = map(int,input().split())
if a in range(1,10) and b in range(1,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)
else :
    print(A*B)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = input().split()
A = int(a)
B = int(b)
if (A < 10) & (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:
n,m=map(int,input().split())
if n<10 and m<10 :
  print(n*m)
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:
try:a,_,b=input()
except:a,b=1,-1
print(int(a)*int(b))

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 (1 <= a and a <= 9 and 1 <= b 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:
def solve():
    a, b = read()
    result = think(a, b)
    write(result)


def read():
    return read_int(2)


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b):
    if a >= 10 or b >= 10:
        return -1
    return a * b


def write(result):
    print(result)


if __name__ == '__main__':
    solve()