Problem:


Score : 100 points

Problem Statement

Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.

Given are two integers A and B.

If Takahashi can calculate A \times B, print the result; if he cannot, print -1 instead.

Constraints

1 \leq A \leq 20

1 \leq B \leq 20

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

If Takahashi can calculate A \times B, print the result; if he cannot, print -1.

Sample Input 1

2 5

Sample Output 1

10

2 \times 5 = 10.

Sample Input 2

5 10

Sample Output 2

-1

5\times 10 = 50, but Takahashi cannot do this calculation, so print -1 instead.

Sample Input 3

9 9

Sample Output 3

81



Sample input:
2 5


Sample output:
10

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B=[int(x) for x in input().rstrip().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 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print("-1")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools

def comb(n, k, mod):
    ret = 1
    for i in range(1, k + 1):
        ret = ret * (n - i + 1) % mod
        ret = ret * pow(i, mod - 2, mod) % mod
    return ret

#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import fractions
import sys
import itertools
import numpy as np
from collections import Counter
#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))



a,b=input2()

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>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<=9 and B<=9 else -1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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


def solve(A: int, B: int):
    if (A>0 and A<10) and (B>0 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:
def main():
    a, b = 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 a>=10 or b>=10 :
    print("-1")
else:
    print(a*b)

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    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 = int(a)
b_int = int(b)

if a_int > 9 or b_int > 9:
    print('-1')
else:
    print(a_int*b_int)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if 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 <= 9 and b <= 9 else -1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = 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<=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:
    ans = A*B
else: ans = "-1" 
print(ans)

Submission status: Accepted

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

if a[0] > 9 or a[1] > 9:
  print(-1)
else:
  print(a[0] *a[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:
def q1():
    A,B = (int(i) for i in input().split())
    if A > 9 or B > 9:
        print(-1)
    else:
        print(A*B)


if __name__ == '__main__':
    q1()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if len(a)>=2 or len(b)>=2:
  print(-1)
else:
  a=int(a)
  b=int(b)
  print(a*b)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if (a == 0 or b == 0): 
  ans = -1
elif (a > 9 or b > 9):
  ans = -1
else :
  ans = a * b

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(answer)

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

Submission status: Accepted

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
a,b=MI()
if 1<=a<=9 and 1<=b<=9:
    print(a*b)
else:
    print(-1)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import Counter, deque

INF = float('inf')


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]
if a in nums and b in nums:
  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 = input().split()
if len(a)==1 and len(b)==1:
  print(int(a)*int(b))
else:
  print(-1)

Submission status: Accepted

Solution code:
from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().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) & (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:
a,b=map(int,raw_input().split())
if a < 10 and b < 10:
  print a*b
else:
  print "-1"

Submission status: Accepted

Solution code:
# ABC 144: A – 9x9
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 len(str(A)) == 1 and len(str(B)) == 1:
  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:
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:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

a, b = map(int, readline().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)&(b<=9):
    print(a*b)
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

def main():
  a, b = map(int, readline().split())
  if a>9 or b>9:
    print('-1')
  else:
    print(a*b)
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

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:
import itertools
import fractions
def main():
  a,b = map(int,input().split())
  print(a*b if a<10 and b<10 else -1)
if __name__ == '__main__':
  main()

Submission status: Accepted

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

a, b = map(int, sys.stdin.readline().split())

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

if __name__ ==  '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
print(-1 if max(A, B) >= 10 else A * B)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    b, c = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def input():
    return sys.stdin.readline().rstrip('\n')

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = a * b
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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 ( A<=9 and B<=9 ):
    print(int(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 = 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<10 and 0<b<10:
    print(a*b)
else:
    print(-1)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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