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

Submission status: Accepted

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

if 1 <= A <= 9 and 1 <= B <= 9:
  total = A * B
else:
  total = -1

print(total)

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

a1 = len(a)
b1 = len(b)

if a1 > 1 or b1 > 1:
    print(-1)
else:
    print(int(a) * int(b))

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if a<=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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b=map(int,input().split())
if  (1<=a<=9) and (1<=b<=9):
    print(a*b)
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

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

# A, Bがともに9以下であるかどうかで場合分け
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 < 10 and b < 10 and a > 0 and b > 0 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:
def main():
    import sys
    readline = sys.stdin.buffer.readline

    a, b = map(int, readline().split())
    print(a*b if a < 10 and b < 10 else -1)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 与えられた数値の桁数と桁値の総和を計算する.
def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums


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

Submission status: Accepted

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

Submission status: Accepted

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

print(multiply(*map(int, input().split())))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys

INF = float('inf')


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


def main():

    sys.setrecursionlimit(10 ** 6)

    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
    print(f'{solve(A, B)}')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    A,B = LI()
    print(A*B if len(str(A))==1 and len(str(B))==1 else -1)

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    if 1 <= A <= 9 and 1 <= B <= 9:
        ans = A * B
    else:
        ans = -1

    print(ans)


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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    A, B = LI()

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

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num = input()

num1,num2 = num.split(' ')

num1 = int(num1)
num2 = int(num2)

if num1 > 9 or num2 > 9:
    print('-1')
else:
    print (num1 * num2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#A-9x9   144

#1 <= A <=20
#1 <= B <=20
#elseは、ifの条件じゃない時に使う

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

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

elif a >=10 or b >=10:
    print('-1')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if A<=9 and B<=9:

   print( A * B )

else:
    print(-1)

Submission status: Accepted

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

# AとB両方が9以下なら計算して出力して、そうでないなら-1を出力する
if A<=9 and B<=9:
    answer=(A*B)
    print(answer)
else:
    print(-1)

Submission status: Accepted

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

if A < 10 and B < 10:
    answer = A * B
    print(answer)

else:
    print('-1')

Submission status: Accepted

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

Submission status: Accepted

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

# aとbが両方9以下なら計算して出力し、それ以外なら-1を出力する
if a <= 9 and b <= 9:
    answer = a * b
    print(answer)
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

answer = A * B

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

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:
S = list(input())
if len(S) < 4:
    print(int(S[0]) * int(S[-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())
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,-1][a>9 or b>9])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# 処理&出力
if a < 10 and b < 10:
    print(a * b)
else:
    print('-1')

Submission status: Accepted

Solution code:
# 144A

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:
# A - 9x9
# 九九の計算
# 九九以外は -1 を返す

# 整数 a b を入力
a, b = map(int, input().split())

# print(a, b)

# a b が9以下の数字か判定し結果を代入
if a <= 9:
    if b <= 9:
        answer = a * b
    else:
        answer = -1
else:
    answer = -1

# 結果の表示
print(answer)

Submission status: Accepted

Solution code:
# A - 9x9
# 九九の計算
# 九九以外は -1 を返す

# 整数 a b を入力
a, b = map(int, input().split())

# print(a, b)

# a b が9以下の数字か判定
if a <= 9:
    if b <= 9:
        answer = a * b
    else:
        answer = -1
else:
    answer = -1

# 結果の表示
print(answer)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

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

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

Submission status: Accepted

Solution code:
#1<=A<=20
#1<=B<=20

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

#elseはifの条件ではないときに使う。
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

answer = a * b

if a >= 10:
    print(-1)
elif b >= 10:
    print(-1)
else:
    print(answer)

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())
x = a * b

if len(str(a)) < 2:
    if len(str(b)) < 2:
        print(x)
        exit()
print(-1)

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
# mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a, b = inpm()
ans = -1
if(a < 10 and b < 10):
    ans = a * b
print(ans)

Submission status: Accepted

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

ans = A*B if max(A,B)<=9 else -1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if 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<10 and B<10:
    ans = A*B

print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if A <= 9 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 <= 9 and b <= 9) and a * b or -1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if max(a,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)
  exit()
else:
  print(a*b)

Submission status: Accepted

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

if __name__ == "__main__":
    solver()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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