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

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

Solution code:
x = input()
x_list = x.split(" ")
a = int(x_list[0])
b = int(x_list[1])
if a < 10 :
    if b < 10 :
        print(a * b)
    else:
        print(-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=(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, 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 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>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>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 a>0:
    if b<10 and b>0:
        print(a*b)
        exit(0)
print(-1)

Submission status: Accepted

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

valid = range(1, 10)
if a in valid and b in valid:
    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)
    exit()

print(A*B)

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

Submission status: Accepted

Solution code:
n=list(map(int,input().split()))
if n[0] <=9 and n[1] <=9:
  print(n[0]*n[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,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 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 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>=1 and 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 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 >= 1) & (A <= 9) & (B >= 1) & (B <= 9):
    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:
        ans = A * B
    else:
        ans = -1
else:
    ans = -1
print(ans)

Submission status: Accepted

Solution code:
import sys


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


if __name__ == '__main__':
    solve()

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

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 = map(str,input().split())
AL = len(A)
BL = len(B)
A = int(A)
B = int(B)

if AL == 1 and BL == 1:
    print(A * B)
else:
    print(-1)

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    a,b=map(int,input().split())
    if(1<=a<=9 and 1<=b<=9):
        print(a*b)
    else:
        print(-1)
resolve()

Submission status: Accepted

Solution code:
from sys import stdin

a,b = [int(x) for x in stdin.readline().rstrip().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=list(map(int,input().split()))
if((a[0]<=9) & (a[1]<=9)):
    print(a[0]*a[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 0<a<10 and 0<b<10:
	result = a*b
else:
	result = -1
print(result)

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
def main():
    a, b = [int(token) for token in 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 = list(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 = [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, 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, 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("{}".format(a*b))
else:
    print(-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:
nums = list(map(int,input().split()))
if max(nums)<=9:
    print(nums[0]*nums[1])
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 = input().rstrip().split(' ')
b = [int(j) for j in a]
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()))
print(a * b if a <= 9 and b <= 9 else -1)

Submission status: Accepted

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

if len(A) == 1 and len(B) == 1:
    print(int(A) * int(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())
#入力のA,B両方が10未満であれば計算して結果を表示。
#それ以外は-1を表示
if A < 10 and B < 10:
	num = A * B
	print(num)
else:
	print("-1")

Submission status: Accepted

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

ans = -1

if A < 10 and A >= 1:
    if B < 10 and B >= 1:
        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:

N_list = []

for i in range(1,10):
    for j in range(1,10):
        N_list.append(i*j)
A_B = list(map(int, input().split()))
if A_B[0] < 10 and A_B[1] < 10:
    s = A_B[0]*A_B[1]
    if s in N_list:
        print(s)
    else :
        print("-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=(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=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:
a, b = map(int, input().split()) 
if a<10:
  if b<10:
    print(a*b)
  else:
    print(-1)
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:
a,b = map(int,input().split())
print(a*b if a<10 and b<10 else -1)

Submission status: Accepted

Solution code:
import sys
import itertools
import bisect

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces


a, b = na()

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

Submission status: Accepted

Solution code:
import sys

[astr, bstr] = sys.stdin.readline().split(" ")
a = int(astr)
b = int(bstr)
result = -1
if a <= 9 and b <= 9:
    result = a * b
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

num = list(map(int, input().split())) 
if num[0]>9 or num[1]>9:
	print("-1")
	sys.exit()
print(num[0]*num[1])

Submission status: Accepted

Solution code:
n = [int(i) for i in input().split()];
#S = [str(s) for s in in_S]

if n[0] > 9 or n[1] > 9:
    print('-1');
else :
    print(n[0] * n[1]);

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    if A < 10 and B < 10:
        print(A*B)
    else:
        print(-1)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

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 = 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 a <= 9:
    if b <= 9:
        print(a * b)
    else:
        print("-1")
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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
a,b=[int(j) for j 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<10 and b<10):
  print(a*b)
else:
  print("-1")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=list(map(int,input().strip().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 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(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())
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 a > 9 or b > 9:
    print('-1')
    exit()
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 = [int(n) for n in input().split(' ')]

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

Submission status: Accepted

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

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

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 = tuple(map(int, input().split()))
if 10 <= A or 10 <= B:
    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 else -1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=list(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:
def math(A, B):
    if A < 10:
      if B < 10:
        result = A*B
      else:
        result = -1
    else:
      result = -1
    return result
 
A, B = map(int,input().split())
result1 = math(A, B)
print(result1)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#ABC144-A 9*9
A, B = map(int, input().split())
if (A//10) + (B//10):
    ans = -1
else:
    ans = A * B
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b = LI()
    def c(x):
        return 1 <= x <= 9
    if c(a) and c(b):
        print(a * b)
        return
    print(-1)
    return

#B
def B():
    a = set()
    for i in range(10):
        for k in range(10):
            a.add(i * k)
    x = II()
    if x in a:
        print("Yes")
    else:
        print("No")
    return

#C
def C():
    n = II()
    factlize = []
    ans = inf
    for i in range(1, int(sqrt(n)) + 1):
        if n % i == 0:
            ans = min(ans, n // i + i - 2)
    print(ans)

    return

#D
def D():
    a, b, x = LI()
    from math import atan

    return

#E
def E():
    def solve(m):
        a1 = a[::-1]
        f1 = f[::1]
        res = 0
        for i in range(n):
            if a1[i] * f1[i] <= m:
                continue
            k = m // f1[i]
            res += a1[i] - k
            if res > K:
                return False
        return True

    n, K = LI()
    a = LI()
    a.sort()
    f = LI()
    f.sort()
    ok = max(a) * max(f)
    ng = -1
    while ok - ng > 1:
        mid = (ok + ng) // 2
        if solve(mid):
            ok = mid
        else:
            ng = mid
    print(ok)
    return

#F
def F():
    return


#Solve
if __name__ == '__main__':
    A()

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:
data = list(map(int,input().split()))
a = data[0]
b = data[1]

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

Submission status: Accepted

Solution code:
import sys

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:
L=list(map(int, input().split()))
A=L[0]
B=L[1]

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

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
usrInput = input()
splitedInput = usrInput.split()
clearFlag = []

for i in range(2):
    if int(splitedInput[i]) < 10:
        clearFlag.append(True)
    else:
        clearFlag.append(False)

if bool(clearFlag[0]) == True and bool(clearFlag[1]) == True:
    print(int(splitedInput[0]) * int(splitedInput[1]))
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if int(A) <= 9 and int(B) <= 9 and int(A) >= 1 and int(B) >= 1:
    print(int(A) * int(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:
i = list(map(int, input().split()))
 #出力：['s_1', 's_2']
A=i[0] #出力：s_1
B=i[1] #出力：s_2

if A<=9 and B<=9:
  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)


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l=list(map(int,input().split()))
a=l[0]
b=l[1]
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)) == 1 and len(str(b)) == 1:
  print(a*b)
else:
  print(-1)

Submission status: Accepted

Solution code:
IN = input().split()
X, Y = int(IN[0]), int(IN[1])

if len(str(X)) == 1 and len(str(Y)) == 1:
  print(X*Y)
else:
  print(-1)