Problem:


Score : 100 points

Problem Statement

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

Given are two integers A and B.

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

Constraints

1 \leq A \leq 20

1 \leq B \leq 20

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

2 5

Sample Output 1

10

2 \times 5 = 10.

Sample Input 2

5 10

Sample Output 2

-1

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

Sample Input 3

9 9

Sample Output 3

81



Sample input:
2 5


Sample output:
10

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


def main():
    a, b = [int(s) for s in sys.stdin.readline().strip().split()]

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


main()

Submission status: Accepted

Solution code:
from collections import *
from math import *
n,p = map(int,input().split())
if(n <= 9 and p <= 9):
    print(n*p)
else:
    print(-1)

Submission status: Accepted

Solution code:
s = input().rstrip().split(' ')
s = [int(x) for x in s] 
flg = True
for i in s:
  if (i < 1) or (i > 9):
    flg = False

if flg:
  print(s[0] * s[1])
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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)
def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))

def solve():

    return

def main():
    a, b = getList()
    if a <= 9 and b <= 9:
        print(a*b)
    else:
        print(-1)



if __name__ =="__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Oct 27 21:03:22 2019

@author: doppe
"""

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

if (A > 0 and A <= 9 and B > 0 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:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = list(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)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    a, b = MAP()
    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, list(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())
if 1<=A<=9 and 1<=B<=9:
  Answer = A*B
else:
  Answer = -1
  
print(Answer)

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

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

Submission status: Accepted

Solution code:
# A - 9x9
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>=0 or b-10>=0:
  print("-1")
else:
  print(a*b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

input_1=int(input_line[0])
input_2=int(input_line[1])



if input_1<=9 and input_2 <=9:
    print (input_1*input_2)
else:print ('-1')

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = [int(i) for i in input().split()]
flag = True
for i in n:
  if(len(str(i))!=1):
    flag = False
if(flag):
  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:
# -*- coding: utf-8 -*-
b, c = map(int, input().split())
if b < 10 and c < 10:
    print(str(b*c))
else: print('-1')

Submission status: Accepted

Solution code:
A, B = (int(x) for x in input().split())
if (0 < A) and (A < 10):
    if (0 < B) and (B < 10):
        print(A * B)
        exit(0)
print("-1")

Submission status: Accepted

Solution code:
from sys import stdin
a, b= [int(x) for x in stdin.readline().rstrip().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<1 or b<1:
    print(-1)
elif 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 and A<=9:
  if 1<=B and B<=9:
    print(A*B)
  else:
    print(-1)
else:
  print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M=map(int,input().split())

if 0<=N<10 and 0<=M<10:
    print(N*M)
else:
    print(-1)

Submission status: Accepted

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

if A > 9 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:
i = [int(x) for x in input().split() if int(x) >= 1 and int(x) <= 9]
if len(i) != 2:
	print(-1)
else:
	print(i[0] * i[1])

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ok = True

if not 1 <= lst[0] <= 9:
    ok = False
if not 1 <= lst[1] <= 9:
    ok = False

if ok:
    print(lst[0] * lst[1])
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

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

_a, _b = map(int, input().split())


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


chker(_a, _b)

Submission status: Accepted

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


def solve(A, B):
    if A > 9 or B > 9:
        return -1

    return A * B


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

Submission status: Accepted

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

if (a > 9 or b > 9):
    ans = -1

print(ans)

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 = [int(v) for v 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())  
c = a*b
if a>9 or b>9:
    print("-1")
else:
    print(c)

Submission status: Accepted

Solution code:
import heapq as h
 
a,b = map(int,input().split())
# l = list(map(lambda x:-int(x),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:
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, b = list(map(int, input().split()))
if (a in range(1,10)) and (b in range(1,10)):
    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:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from itertools import permutations, combinations,combinations_with_replacement,product
from fractions import Fraction as frac
import bisect
import heapq

import logging
logging.basicConfig(level=logging.DEBUG)

import sys
#input = sys.stdin.readline().rstrip

setrecursionlimit(1000000)

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

def main():
    A,B=[int(x) for x in input().split()]

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

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:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
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:
    if 1<=B<=9:
        print(A*B)
    else:
        print('-1')
else:
    print('-1')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000)
INF = 1<<32


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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    A,B=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    flag = 0
    if A <= -1:
        flag = 1
    if A >= 10:
        flag = 1
    if B <= -1:
        flag = 1
    if B >= 10:
        flag = 1
    if flag == 1:
        print("-1")
    else:
        print(A * B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

#print(A,B)

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

Submission status: Accepted

Solution code:
D = input().split(' ')

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

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

Submission status: Accepted

Solution code:
a,b=(int(x) for x in input().split())
if a > 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())

# kari = "2 5"
# A,B = map(int, kari.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:
import collections
import numpy as np
 
# = input()
# = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
#
 
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(lambda i: int(i), input().split(' '))

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

main()

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

if a<1 or 9<a or b<1 or 9<b:
    print('-1')

else:
    print(a*b)

Submission status: Accepted

Solution code:
a, b = [int(x) for x in 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:
a, b = map(int, input().split())

al=len(str(a))
bl=len(str(b))

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = -1

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

if b <= 9:
    if a <= 9:
        ans = a*b
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
(a,b) = list(map(int,input().split()))
if a>9: 
    print(-1)
    exit(0)
if b>9:
    print(-1)
    exit(0)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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:
temp = input().split()
a = int(temp[0])
b = int(temp[1])
if 1 <= a and a <= 9 and 1 <= b and b <= 9:
  print(a * b)
else:
  print(-1)

Submission status: Accepted

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

if x < 10 and y < 10 and x > 0 and y > 0:
    print(x*y)
else:
    print(-1)

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    a, b = map(int, args[0].split())
    ret = -1
    if a < 10 and b < 10:
        ret = a*b

    return str(ret)


if __name__ == "__main__":
    print(solve(*[input() for _ in range(1)]))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[A,B] = [int(x) for x in input().split()]
if A<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
    print(ans)
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("{}".format(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:
  print(-1)

elif 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:
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


(A, B) = tuple([int(s) for s in input().split()])

print(calc(A, B))

Submission status: Accepted

Solution code:
#!/usr/bin/pypy
A, B=map(int, raw_input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    def check(x):
        return x < 1 or x > 9


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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# abc144
def test(a):
    return 1 <= a and a <= 9
def sol(a,b):
    if test(a) and test(b):
        return a*b
    else :
        return -1
# in your code
read = input 
rn = lambda :list(map(int, read().split()))
def reverse_range(r):return range(r-1, -1, -1)
a,b = rn()
print(sol(a,b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
N=[int(item) for item in N.split()]
A=N[0]
B=N[1]
if 0<A<10 and 0<B<10:
    print(A*B)
else:
    print(-1)

Submission status: Accepted

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

    print(result)


if __name__ == '__main__':
    answer()

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

def check(a,b,n):
    return a<= n and n<= b

ans = A*B if check(1,9,A) and check(1,9,B) else -1
print(ans)

Submission status: Accepted

Solution code:
A, B = input().split()
length = len(A)+len(B)
A, B = map(int, [A,B])
ans = A*B

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

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

ans = A*B
if A>9:
    ans=-1
if B>9:
    ans=-1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

# スペース区切りの整数の入力
A, B = map(int, input().split())

if(A < 10 and B < 10):
  print("{}".format(A*B))
else:
  print("-1")

Submission status: Accepted

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

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:
def main(a, b):
    if 1 <= a <= 9 and 1 <= b <= 9:
        return a * b
    else:
        return -1


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import random

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

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

Submission status: Accepted

Solution code:
get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

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

A, B = list(map(int, input().split()))
if A >= 10 or B >= 10:
    print(-1)
    sys.exit()

print(A*B)

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

Submission status: Accepted

Solution code:
# A 9x9

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