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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_list = list(map(int, input().split()))
a = input_list[0]
b = input_list[1]

if (1 <= a <= 9) & (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=input().split()
A=int(A)
B=int(B)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = list(map(int, input().split()))
a = n[0]
b = n[1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    
    a, b = map(int, input().split())
    
    if a < 10:
        if b < 10:
            print(a*b)
            return
    
    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:
# coding:utf-8
[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<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)
    exit()
 
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 -*-


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

Submission status: Accepted

Solution code:
class Takahashi:
  def __init__(self, a , b):
    self.a = a
    self.b = b
    
  def test(self):  
    if self.a <10 and self.b <10:
      return a * b
    else:
      return '-1'
    
a, b = list(map(int,input().split(' ')))
#print(a,b)
keisan = Takahashi(a,b)
ans = keisan.test()
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve():
    return


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import numpy as np
#N=int(input().strip())
#x=[0]*N
#y=[0]*N
#
#for i in range(N):
#    x[i],y[i]=list(map(int,input().strip().split()))

import sys

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

if A>9 or B>9:
    print(-1)
    sys.exit()
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:
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:
inputs = list(map(int, input().split()))
a = inputs[0]
b = inputs[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 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:

A_str, B_str = input().split()
A, B = int(A_str), int(B_str)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

if __name__ == '__main__':

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

	if (1 <= A[0] <= 9) and (1 <= A[1] <= 9):
		print(A[0] * A[1])
	else:
		print(-1)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())

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

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 = [int(_) for _ in 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()))
if(a[0] < 10 and a[1] < 10):
    print(a[0]*a[1])
else:
    print('-1')

Submission status: Accepted

Solution code:
x,y =map(int,input().split())

if x > 9:
    print(-1)

elif y > 9:
    print(-1)

else:
    print(x*y)

Submission status: Accepted

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

Submission status: Accepted

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

can_calc_nums = list(filter(lambda x: 1 <= x and x <= 9, num_array))
answer = -1
if len(can_calc_nums) == 2:
	answer = can_calc_nums[0] * can_calc_nums[1]

  
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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:
S = input()
li = S.split(" ")
A = int(li[0])
B = int(li[1])
if A>9 or B>9:
    print(-1)
else:
    print(A*B)

Submission status: Accepted

Solution code:
# 2019-11-19 19:43:48(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
# import numpy as np 


def main():
    a, b = [int(x) for x in sys.stdin.readline().split()]
    print(-1 if a >= 10 or b >= 10 else a * b)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
list = input().split(' ')
A = int(list[0])
B = int(list[1])
if A <= 9 and B <= 9:
    print(A*B)
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# スペース区切りの整数の入力
b, c = map(int, input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print('{}'.format(a*b if a<10 and b<10 else -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:
ar=list(map(int,input().split()))
if ar[1]<10 and ar[0]<10:
  print(ar[0]*ar[1])
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:
x,y=map(int,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 or b > 9:
    print("-1")
else:
    ans = a * b
    print(ans)

Submission status: Accepted

Solution code:
import re
A,B = input().split(' ')
if len(A) == 1 and len(B) == 1:
    print(int(A)*int(B))
else:
    print(-1)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def judge(a,b):
  if a<10 and b<10:
    print(a*b)
  else:
    print(-1)

a,b = map(int,input().split())
judge(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 1 <= A <= 9 and 1 <= B <= 9:
    print("{}".format(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 and a <= 9 and 1 <= b and b <= 9:
  print(a*b)
else:
  print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from fractions import gcd
from datetime import date, timedelta
from heapq import*
import math
from collections import defaultdict, Counter, deque
import sys
from bisect import *
import itertools
import copy
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7




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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = map(int, raw_input().split())
if n < 10 and k < 10:
    print n * k
else:
    print -1

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = input().split()
l = []
for i in num:
	l.append(int(i))
if l[0] >= 10 or  l[1] >= 10:
    print("-1")
else:
    a = l[0] * l[1]
    print(a)

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:
class Solution:
    def solve(self, a: int, b: int) -> int:

        if 1 <= a <= 9 and 1 <= b <= 9:
            return a*b
        else:
            return -1


if __name__ == '__main__':

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

    # solve
    solution = Solution()
    print(solution.solve(a, b))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(A*B)

Submission status: Accepted

Solution code:
s=input();a,b=map(int,s.split())
print([a*b,-1][len(s)>3])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# 整数 > 整数型
def I(): return int(input())

# 整数列 '1 2 3 4' > 整数型リスト
def IsIl(): return list(map(lambda x: int(x), input().split()))

# 改行挟む整数列　'1/n 2/n 3/n' > 整数型りすと
def InIl(n): return [input() for i in range(n)]

# 整数列 '1 2' > 整数型タプル
def IsIt(): return map(lambda x: int(x), input().split())

# 改行挟む整数列　'1\n 2\n 3\n' > 整数型たぷる
def InIl(n): return map(input() for i in range(n))

# 文字列 'abcd' > 文字型リスト
def SsSl(): return list(map(lambda x: x, input()))

# 整数 '1234' > 整数型リスト

# 文字列 'aba' > 辞書（文字型:個数）{'a':2,'b':1}
def SSd():
    from collections import defaultdict
    A = input() # [int(i) for i in input().split()]
    dd=defaultdict(int)
    for a in A:
        dd[a]+=1
    return dd

n,m=IsIt()

if 1 <= n and n <= 9 and 1 <= m and m <= 9:
    print(n*m)
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:
#!/usr/bin/env python3
# -*- 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:
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) & (1<=b<=9):
    print(a*b)
else:
    print(-1)

Submission status: Accepted

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

if a < 1 or a > 9:
    print(-1)
elif b < 1 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:
s = input()
if len(s) > 3:
  print(-1)
else:
  print(eval(s.replace(" ", "*")))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc144/tasks/abc144_a
# -*- coding: utf-8 -*-

input_val = list(map(int, input().strip().split()))

if input_val[0] < 10 and input_val[1] < 10:
    cal_val = input_val[0] * input_val[1]
else:
    cal_val = -1

print(cal_val)

Submission status: Accepted

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

if a > 0 and a < 10 and b > 0 and b < 10 :
    result = a * b

print(result)

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC144a


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input().split()
output = -1
s0 = int(s[0]) 
s1 = int(s[1]) 
if (0 < s0 and s0 < 10 and 0 < s1 and s1 < 10):
  output = s0*s1
  
print(output);

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

else:
    print(-1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=list(map(int,input().split()))
a=[i for i in range(1,10)]
ans=0
if n[0] in a and n[1] in a:
  ans=n[0]*n[1]
else:
  ans=-1
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:
def takahashi(A,B):
	if A < 10 and B < 10:
		print(A*B)
	else:
		print(-1)
A, B = map(int, input().split())
takahashi(A,B)

Submission status: Accepted

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

if a > 9 or b > 9:
	print("-1")
else:
	out = a * b
	print('{0}'.format(out))

Submission status: Accepted

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

Submission status: Accepted

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

else:
    print(-1)

Submission status: Accepted

Solution code:
a = input()
b = a.split()
c1 = int(b[0])
c2 = int(b[1])
if (1 <= c1 <= 9 and 1 <= c2 <= 9 ):
    ans = c1*c2
else:
    ans = -1

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(str, input().split())
num = [str(x) for x in range(1, 10)]
if a in num and b in num:
  print(int(a)*int(b))
else:
  print(-1)

Submission status: Accepted

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