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:
m = input()
n = m.split(" ")
if (int(n[0])<=9 and int(n[1])<=9):
    print(int(n[0])*int(n[1]))
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 9<A or 9<B:
    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:
#!/usr/bin/env python3
#ABC144 A

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

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:
# coding: utf-8
# Your code here!
x,y=input().split()

if int(x)<=0 or int(x)>=10 or int(y)<=0 or int(y)>=10:
    print("-1")
else:
    print(int(x)*int(y))

Submission status: Accepted

Solution code:
import sys

#+++++
		
def main():
	b , c = map(int, input().split())
	if b <= 9 and c <= 9:
		return b*c
	print(-1)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

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=(int(x) for x in input().split())

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

Submission status: Accepted

Solution code:
def acinput():
    return list(map(int, input().split(" ")))


A,B=acinput()

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

Submission status: Accepted

Solution code:
q=list(map(int,input().split()))
ans=1
for i in q:
	if 1 <= i <=9:
		ans=ans*i
	else:
		print('-1')
		exit()
print(ans)

Submission status: Accepted

Solution code:

def input_int():
    hoge = input().split()
    A = int(hoge[0])
    B = int(hoge[1])
    return A, B

if __name__ == "__main__":
    A, B = input_int()
    if A <=9 and B <= 9:
        ret = A * B
    else:
        ret = -1
    print(ret)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = raw_input().split()
[A, B] = s
A = int(A)
B = int(B)
#print A, B

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<=9)&(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=(int(x) for x in input().split())
if 0<=A<=9 and 0<=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 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 = [int(n) for n in input().split(' ')]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
def multiply(A, B):
  if A < 10 and B < 10:
    return A * B
  else:
    return -1

if __name__ == '__main__':
  A, B = map(int, input().split())
  print(multiply(A, B))

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if A < 1 or A > 9:
    print('{}'.format(-1))
elif B < 1 or B >9:
    print('{}'.format(-1))
else:
    print('{}'.format(A * B))

Submission status: Accepted

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

if i[0] <= 9:
    if i[1] <= 9:
        print(i[0] * i[1])
    else:
        print('-1')

else:
    print('-1')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
data = list(map(lambda x: int(x), input().split()))
     
if __name__ == "__main__":
  if data[0] < 10:
    if data[1] < 10:
      answer = data[0]*data[1]
    else:
      answer = -1
  else:
    answer = -1
    
  print(answer)

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8
# n,k = int(input())
# list = list(map(int,input().split()))
# strings = list(map(str, [input() for i in range(amount)]))

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

if a >= 10 or b >= 10:
    l = -1
else:
    l = a*b

print(l)

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

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 = input().split(" ")
a = [int(i) for i in a]

if a[0] + a [1] <= 0 or a[0] * a[1] <= 0:
  print(-1)
  
else:
  if a[0] >= 10 or a[1] >= 10:
    print(-1)
  else:
    print(a[0] * a[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:
  r=A*B
else:
  r=-1
print(r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a ,b = 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())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

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

Submission status: Accepted

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


if AB[0] >= 10 or AB[1] >= 10:
    print(-1)
else:
    print(AB[0] * AB[1])

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

for line in sys.stdin:
    A, B = list(map(int, line.split(' ')))


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

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 = [int(i) for i in 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 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:
inp = input().split()
a = int(inp[0])
b = int(inp[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a <= 9:
  if b <= 9:
    d = a * b


print(d)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from itertools import product
from bisect import bisect
from collections import deque
import sys
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))
A, B = inpl()
if max(A, B) <= 9:
    print(A*B)
else:
    print(-1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = [1,2,3,4,5,6,7,8,9]
if a in c and b in c:
  print(a*b)
else:
  print('-1')

Submission status: Accepted

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


def calc(A, B):
    if A >= 1 and A <= 9 and B >= 1 and B <= 9:
        return A * B
    return -1

print(calc(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 = [ int(v) for v in input().split() ]
print( num[0]*num[1] if all([ 1 <= i < 10 for i in num ]) else -1 )

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
L,R = map(int,input().split())

if L >= 10 or R >= 10 or L < 1 or R < 1:
    print(-1)
else:
    print(L*R)

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:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    
    if A > 9 or B > 9:
        print(-1)
    else:
        print(A * B)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = (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:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin
A, B = F.readline().rstrip().split()
A = int(A)
B = int(B)

if A < 10 and B < 10:
    print(A * B)
    sys.exit()

print('-1')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l=[int(i) for i in input().split(" ")]
if l[0]>=1 and l[0]<=9 and l[1]>=1 and l[1]<=9:
    ans=l[0]*l[1]
else:
    ans=-1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a = int(x[0])
b = int(x[1])

if (1 <= a <= 9) and (1<= b <= 9):
  print("{}".format(a*b))
else:
  print("{}".format(-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 < 1 and b/10 < 1:
    print(a*b)
else:
    print(-1)

Submission status: Accepted

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

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

# print(A)
# print(B)

if A > 9:
    print(-1)
elif B > 9:
    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:
def solv(x, y):
    if (x >= 1 and x <= 9) and (y >= 1 and y <= 9):
        return x * y
    else:
        return -1

x, y = map(int, input().split(" "))
print(solv(x, y))

Submission status: Accepted

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

def solve():
    A,B = map(int, input().split())
    if A <= 9 and B<=9:
        return str(A*B)
    else:
        return '-1'    

if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
#import numpy as np
#from numpy import*
#from scipy.sparse.csgraph import shortest_path #shortest_path(csgraph=graph) # dijkstra# floyd_warshall
#from scipy.sparse import csr_matrix
 
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby accumulate
from operator import mul,itemgetter
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)
#input=sys.stdin.readline  #危険！基本オフにしろ！
 
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 1 <= a <= 9 and 1 <= b <= 9:
    print(a * b)
else:
	print ('-1')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if (1 <= a <= 9) & (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())
result = -1
if a in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
    if b in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
        result = a*b
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8


def main(N):
    a, b = N.split()
    a = int(a)
    b = int(b)
    if a > 9 or a < 1:
        return -1
    if b > 9 or b < 1:
        return -1
    return a*b

if __name__ == "__main__":
    N = input()
    my_ans = main(N)
    print(my_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 > 9 or b > 9:
  print(-1)
else:
  print(str(a*b))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if x >= 10 or y >= 10:
  print(-1)
else:
  print(x*y)

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:
line = [int(i) for i in input().split(" ")]
v1 = line[0]
v2 = line[1]

if 0 < v1 and v1 < 10 and 0 < v2 and v2 < 10 :
  print(str(v1*v2))
else:
  print("-1")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    if a > 0 and a < 10 and b > 0 and b < 10 :
        print(a * b)
    else:
        print(-1)
        
if __name__ == '__main__':
    ABC144_20191027_A()

Submission status: Accepted

Solution code:
num = input()
num1, num2 = num.split(" ")
num1, num2 = int(num1), int(num2)
if num1<=9 and num2<=9:
    print(num1*num2)
else:
    print(-1)

Submission status: Accepted

Solution code:


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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(int(1e6))

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

Submission status: Accepted

Solution code:
n = [int(i) for i in input().split()]
if 1 <= n[0] <= 9 and 1 <= n[1] <= 9:
    print(n[0] * n[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())
ans=0

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

Submission status: Accepted

Solution code:
a,b = [int(j) for j in raw_input().split()]
if a<10 and a>0 and b>0 and b<10:
  print(a*b)
else:
  print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

number = input().split(" ")

if (int(number[0]) <= 9) & (int(number[1]) <= 9):
    print(int(number[0]) * int(number[1]))
else:
    print(-1)

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


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

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:
"""
https://atcoder.jp/contests/abc144/tasks/abc144_a
"""
import numpy as np


def calc(A: int, B: int) -> int:
    if 1 <= A <= 9 and 1 <= B <= 9:
        return A * B
    return -1


def load_input_as_int_array() -> np.ndarray:
    return np.array([int(v) for v in input().split(" ")])


def main() -> None:
    A, B = load_input_as_int_array()
    result = calc(A, B)
    print(result)


main()

Submission status: Accepted

Solution code:
import sys
val1, val2 = sys.stdin.readline().rstrip().split()
val1 = int(val1)
val2 = int(val2)
if val1 > 0 and val1 < 10 and val2 > 0 and val2 < 10:
    print(val1 * val2)
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")
  exit()
  
for i in range(1, 10):
  for j in range(1, 10):
    if N == i*j:
      print(N)
      exit()
print("-1")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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