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

input = sys.stdin.readline

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
# import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
# n = int(input())
a,b = map(int,input().split())
ans = -1
if 1<=a<=9 and 1<=b<=9:
    ans = a*b

print(ans)

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
a,b = list(map(int,input().split()))
if a>=10 or b>=10:
    print("-1")
else: print("{:}".format(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:
import sys
input = sys.stdin.readline

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#144_A
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())
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:
A, B = 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())
ans = 0
if a <= 9 and b <= 9:
    ans = a * b
else:
    ans = -1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve():
    N, M = map(int, input().split())
    return N*M if max(N, M) < 10 else -1

print(solve())

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c=False
if a<10:
    if b<10:
        c=True
 
if c==True:
  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:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
A, B = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

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

Aketa = len(str(A))
Bketa = len(str(B))

if Aketa==1 and Bketa==1:
    out = A*B
else:
    out='-1'

print(out)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

a, b = stdin.readline().rstrip().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 max(a, 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 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())
ans = 0
if a > 9 or b > 9:
  ans = -1
else:
  ans = a * b
print(ans)

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

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 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
import os


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

    a, b = list(map(int, sys.stdin.readline().split()))
    if a < 10 and b < 10:
        print(a*b)
    else:
        print(-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:
ab = [int(i) for i in input().split()]

if all(1 <= i <= 9 for i in ab):
	a, b = ab
	print(a * b)
else:
	print(-1)

Submission status: Accepted

Solution code:
#import math
#import bisect
#import numpy as np
#import itertools
#import copy
import sys

input = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    a, b = list(map(int,input().split()))

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if 0<num[0]<10 and 0<num[1]<10:
  a = num[0]*num[1]
else:
  a = -1

print(a)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input().split()
if int(N[0]) >= 10 or int(N[1]) >= 10:
    print("-1")
else:
    print(int(N[0])*int(N[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 all([i-1 in range(9) for i in [a, b]]):
  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 = (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())

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:
# coding: utf-8


def main():
    operand_a, operand_b = map(int, input().split(' '))

    if operand_a < 10 and operand_b < 10:
        print(operand_a * operand_b)
    else:
        print(-1)

    return 0


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
number = input().split(" ")
A = int(number[0])
B = int(number[1])
if A >= 10:
	print(-1)
elif B >= 10:
	print(-1)
else:
	print(A * B)

Submission status: Accepted

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

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

print(a*b)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    A,B = map(int,input().split())
    if 1 <= A < 10 and 1<= B < 10:
        print(A*B)
    else:
        print('-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())
print(a*b if a < 10 and b < 10 else -1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#python3

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
if 0<n<10 and 0<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:
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 max(a, 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:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc144/tasks/abc144_a

a, b = [int(x) for x in 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 <= 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())
ans = -1
if len(str(a))==1 and len(str(b))==1:
    ans = a * b
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

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

if __name__=='__main__':
  main()

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:
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 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:
# -*- coding:utf-8 -*-
a,b = map(int, input().split())

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

Submission status: Accepted

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

if len(str(A))>1 or len(str(B))>1:
  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 = list(map(int, input().split()))
b = a[0]
c = a[1]
if b >9 or c>9:
    print(-1)
else :
    print(b*c)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC144
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:
AB = input()    
A, B = AB.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 <= 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())
print(a*b if max(a,b) < 10 else -1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

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

main()

Submission status: Accepted

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