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

Submission status: Accepted

Solution code:
a,b= map(int, input().split())
#print(len(str(a)+str(b))) 
print(a*b if len(str(a)+str(b))<3 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:
# -*- coding: utf-8 -*-
a,b = map(int, input().split())
if b<10 and a<10:
  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 or B >= 10:
    print(-1)
    exit()

ans = A * B
print(ans)

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
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().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:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a,b = nm()

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

Submission status: Accepted

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

if (a < 10):
    if (b < 10):
        ans = a * b
    else:
        ans = -1
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 = 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 1<=A<=9 and 0<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(str,input().split())
if len(a+b) < 3:
  print(int(a)*int(b))
else:
  print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter
from collections import deque
import math
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
import sys
def ISI(): return map(int, sys.stdin.readline().rstrip().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC144A

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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 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:
n = list(map(int,input().split()))
if max(n)>9:
    print(-1)
else:
    print(n[0]*n[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 = list(map(int,input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if(len(str(x[0])) < 2 and len(str(x[1])) < 2):
  print(x[0] * x[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:
A, B = map(int, input().split())
if A < 10 and B < 10:
    print(A * B)
else:
    print('-1')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
#mod = 10**9 + 7
mod = 998244353

A, B = rl()

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());print([a*b,-1][a>9 or b>9])

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print(A*B if 1<=A<=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())
li = []
for i in range(1,10):
    for j in range(1,10):
        if i==a and j == b:
            print(a*b)
            exit()
print(-1)

Submission status: Accepted

Solution code:
import fileinput

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

Submission status: Accepted

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

if __name__ == '__main__':

    ABC_144_A()

Submission status: Accepted

Solution code:
def main():
    A, B = map(int,input().split())
    print( A * B if (A // 10 == 0) & (B // 10 == 0) else -1) 
    return 0
    
if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if a == 0 or a >= 10 or b == 0 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(str(-1)+"\n")
else:
  print(str(a*b)+"\n")

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


a, b = Is()
if a > 9 or b > 9:
    print("-1")
else:
    print(a*b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code

def resolve():
    A,B=pin()
    if A>9 or B>9:print(-1);return
    print(A*B)
#%%submit!
resolve()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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)


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

Submission status: Accepted

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

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

Submission status: Accepted

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

if len(A)==2 or len(B)==2:
    print(-1)
    exit(0)

print(int(A)*int(B))

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
print(A*B) if A <=9 and B <=9 else 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 -*-
"""
Created on Sun May  3 18:07:38 2020

@author: Kanaru Sato
"""

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

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(str,input().split())

if len(a)==len(b)==1:
    print(int(a) * int(b))

else:
    print(-1)

Submission status: Accepted

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

if A < 10 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:
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())
print(-1 if a not in range(1, 10) or b not in range(1, 10) else 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 and B < 10:
    print(A*B)
else:
    print(-1)

Submission status: Accepted

Solution code:
#ABC144A https://atcoder.jp/contests/abc144/tasks/abc144_a

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    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:
#!/usr/bin/env python3

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

Submission status: Accepted

Solution code:
def main():
    a, b = 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 len(str(a))>1 or len(str(b))>1:
	print("-1")
else:
	print(a*b)

Submission status: Accepted

Solution code:
def judge99(x):
    if x <= 9:
        return True
    else:
        return False

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

a,b = inputIL()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m = (int(x) for x in 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())
print(A*B if A<=9 and B<=9 else '-1')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    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:
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 A <1 or B > 9 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//10>0 or b//10>0:
  print(-1)
else:
  print(a*b)

Submission status: Accepted

Solution code:
m, n = map(int, input().split())

ret = m*n
if (m > 9) or (n > 9):
    ret = -1
print(ret)