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:

from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().split()]
if A<1 or A>9 or B<1 or B>9:
    ans = -1
else:
    ans = A*B

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
inputStr = input().split(" ")
numList = [int(s) for s in inputStr]

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

print(ans)

Submission status: Accepted

Solution code:
import sys

A, B = [int(x) for x in sys.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 < 10 and A > 0 and B < 10 and B > 0:
  C = A * B
else:
  C = -1

print(C)

Submission status: Accepted

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


import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 

#n = int(input())
a,b = [int(i) for i in 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 <= 9 and 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 1 <= a <= 9:
    if 1 <= b <= 9:
        print(a * b)
        exit()
print("-1")

Submission status: Accepted

Solution code:
inp=input().split()
A=int(inp[0])
B=int(inp[1])
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 <= 9 and B <= 9:
  print(A*B)
  
else:
  print(-1)

Submission status: Accepted

Solution code:
import sys
from collections import Counter, deque, defaultdict
from math import factorial
import heapq, bisect
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

a, b= MAP()

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

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

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

Submission status: Accepted

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


def solve(a, b):
    def check(num):
        if num > 9 or num < 1:
            return 0
        return num
    result = check(a) * check(b)
    if result == 0:
        return -1
    return result


def main():
    a, b = input_from_console()
    print(solve(a, b))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  # Check if the python interpreter is in debug mode or not.
        check_cases()
    else:
        main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = map(int, tuple(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:
	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 != 0 or B // 10 != 0:
  print(-1)
else:
  print(A * B)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if (a<10)and(b<10)and(a>0)and(b>0):
    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:
import sys
a, b = map(int, input().split())
k = range(1,10)
if a in k:
 if b in k:
  print(a*b)
  sys.exit()
 else:
  pass
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 = (int(x) for x in input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
j=input()
i = j.split(' ')
k = []
for c in i:
    k.append(int(c))
if k[0]<10 and k[1]<10:
	print(k[0]*k[1])
else:
	print(-1)

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

def check(x):
  if 1<= x <=9:
    return True
  else:
    return False

if  check(A) & check(B):
  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 = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print(ans)
else :
    ans = -1
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

digit_a = len(a)
digit_b = len(b)

if digit_a == 1 and digit_b == 1:
  answer = int(a) * int(b)
else:
  answer = -1

print(answer)

Submission status: Accepted

Solution code:
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

a, b = na()
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 A <=9 and B <=9 else -1)

Submission status: Accepted

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

if n1 < 10 and n2 < 10:
    print(n1 * n2)
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:
input_list = input().split()
nine = [1,2,3,4,5,6,7,8,9]
A = int(input_list[0])
B = int(input_list[1])
if A in nine:
    if B in nine:
        print(A*B)
    else:
        print('-1')
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>=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 = 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 len(str(A)) >= 2 or len(str(B)) >=2:
        print(-1)
else:
        print(A * B)

Submission status: Accepted

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

for x in a:
    if(x < 1 or x > 9):
        print("-1")
        exit()
print(a[0]*a[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:
x, y = map(int, input().split())
ans = x * y
if x<10 and y<10:
    print(ans)
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, raw_input().split())
if A > 9 or B > 9:
    print('-1')
else:
    print(A*B)

Submission status: Accepted

Solution code:
a,b = input().split()
c = int(a)
d = int(b)
if len(a) == 1 and len(b) == 1 :
    print(c*d)
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:
number =list(map(int, input().split()))

if (1 <= number[0] <= 9) and (1 <= number[1] <= 9):
    print(number[0] * number[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:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if a <= 9 and b <= 9:
    r  = a*b
else:
    r = -1
print("{}".format(r))

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] = list(map(int, input().split()))
N = [i for i in range(1, 10)]
if A in N and B in N:
    print(A*B)
else:
    print(-1)

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
if 1<=A[0]<=9 and 1 <= A[1] <=9:
  out=A[0]*A[1]
  print(str(out))
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:
#-*- coding:utf-8 -*-
a, b = map(int, input().split())
if (a > 9) | (b > 9):
    print(-1)
elif (a < 1) | (b < 1):
    print(-1)
else:
    print(a*b)

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

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

ans_a = 0
ans_b = 0

for i in list_aaa:
    if A == i :
        ans_a = 1
    if B == i:
        ans_b = 1
    else:
        ans = 2

if ans_a ==1 and ans_b ==1:
    print(A*B)
else:
    print('-1')

Submission status: Accepted

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

if i[0] >= 10 or i[1] >= 10:
    ans = -1
else:
    ans = i[0] * i[1]

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
 
input = sys.stdin.readline
 
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 >= 10:
    print("-1")
    exit()
if B >= 10:
    print("-1")
    exit()

print(A*B)

Submission status: Accepted

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

if len(str(a))==1 and len(str(b))==1:
    print(a*b)
    exit()
else:
    print("-1")

Submission status: Accepted

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

Submission status: Accepted

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

print(result)

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

qA, modA = divmod(A, 10)
qB, modB = divmod(B, 10)

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

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
li = [i for i in range(1,10)]
if a in li and b  in li:
    print(a*b)
else:
    print(-1)

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
num = -1
fl = 0
na = float(l[0])
nb = float(l[1])
for i in l:
  if 0 < i:
    if i < 10:
      fl += 1
if fl == 2:
  num = l[0] * l[1]
print(num)

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
if A > 9 or B > 9:
  print(-1)
elif A == 0 or B == 0:
  print(-1)
else:
  print(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:
x = list(map(int, input().split()))
a = x[0]*x[1]
if x[0]<=9 and x[1]<=9:
  print(a)
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:
import sys
A,B = map(int, input().split())
if A<10:
    if B<10:
        print(A*B)
        sys.exit()
print('-1')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding : utf-8

a, b = list(map( lambda x:int(x), 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:
  print(-1)
elif 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:
n,m = list(map(int,input().split()))

if n<10 and m < 10:
  print(n*m)
else:
  print(-1)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

a, b = map(int, input().split())
if a < 10 and a > 0 and b < 10 and b > 0:
	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 = input().split()
a=int(a)
b=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:
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    A,B=mis()
    print(A*B if 0<A<10 and 0<B<10 else '-1')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline
A, B = list(map(int, readline().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:
def run(A, B):
    ret = A * B
    if A > 9:
        ret = -1
    if B > 9:
        ret = -1
    return ret


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


if __name__ == '__main__':
    main()

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>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:
    ans = a * b
else:
    ans = -1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy

# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()

'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''

'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''

'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''

'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''

'''
.append(要素)
.extend(要素)
.insert(場所,要素)
del 配列名[場所]
-1で末尾で末尾から一つ前
'''
'''
間に空白追加
' '.join(lis)
'''
'''
copy.copy(配列名)
'''
'''
sort()
sorted(reverse=true)
'''
'''
2分探索
bisect.bisect_left(リスト, 要素)
'''
num = stdin.readline().rstrip().split()
num1 = int(num[0])
num2 = int(num[1])
if (num1 >= 10 or num2 >= 10):
    print(-1)
else:
    print(num1*num2)

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 = [int(i) for i in input().split()]
#print(A, B)

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=[int(thing) for thing in input().split(" ")]
if A<=9 and B<=9:
    print(A*B)
else:print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = input().split(" ")
line[0] = int(line[0])
line[1] = int(line[1])

result = 0

if line[0] > 9 or line[1] > 9:
    result = -1
else:
    result = line[0] * line[1]

print(result)

Submission status: Accepted

Solution code:
B = [int(a) for a in input().split() ]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()
# template


def main():
    A, B = mi()
    if A >= 10 or B >= 10:
        print(-1)
    else:
        print(A * B)
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def solve():
  a,b = (int(i) for i in input().split())
  if a<=9 and b <= 9:
    print(a*b)
  else:
    print(-1)
solve()

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

Submission status: Accepted

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

num_range = range(1, 10)

if nums[0] in num_range and nums[1] in num_range:
    print(nums[0] * nums[1])
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
  x, y = map(int, input().split())
  if (x > 9 or y > 9):
    print(-1)
  else:
    print(x*y)


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:
import sys

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


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

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:
A_B=input().split()
A=int(A_B[0])
B=int(A_B[1])
flag=True

if 1>A or A>=10:
    flag=False

if 1>B or B>=10:
    flag=False

if flag==False:
    print(-1)
else:
    print(A*B)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if int(s[0]) <= 9 and int(s[0]) >= 1 and int(s[1]) <= 9 and int(s[0]) >= 1:
    print(int(s[0]) * int(s[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:
# 2つの入力を空白で分割し、数値化
A, B = map(int, input().split())

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

print(-1)

Submission status: Accepted

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

if li[0] < 10 and li[1] < 10:
    print(li[0] * li[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 = list(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

a,b = [int(x) for x in stdin.readline().rstrip().split()]

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