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:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    A, B = MAP()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author:   bebebe
# Created:  2019-10-27
#


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


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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
ii0 = lambda: ii() - 1
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    A, B = mis()
    if A <= 9>= B:
        print(A*B)
    else:
        print(-1)


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    A,B  = map(int, input().split())
    if A > 9:
        print(-1)
        exit()
    if B > 9:
        print(-1)
        exit()
    print(A * B)

        
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

if A < 1 or A > 9:
    print(-1)
    sys.exit()

if B < 1 or B > 9:
    print(-1)
    sys.exit()

print(A*B)

Submission status: Accepted

Solution code:
i = input()
A = int(i.split(' ')[0])
B = int(i.split(' ')[1])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

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 (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())
res = 0

if (a>9) | (b>9):
    res = -1
else:
    res = a*b

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(result)

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:
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 = 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:
import sys

sys.setrecursionlimit(10 ** 6)

def main():

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

main()

Submission status: Accepted

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

r = range(1,10)
if(a in r and b in r):
    print(a*b)
else:
    print(-1)

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
import bisect
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]


    a, b  = LMIIS()

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



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    a()

Submission status: Accepted

Solution code:
a, b = [int(n) for n 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()]
ans = -1
if 1 <= a <= 9 and 1 <= b <= 9:
    ans = a * b
print(ans)

Submission status: Accepted

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

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

print(A*B)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


def LI(): return list(map(int, input().split()))


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


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

# B


def B():
    N = II()
    A, B = LI()
    ans = 0
    for i in range(N):
        for x in range(i+1, N):
            ans += d[i]*d[x]
    print(ans)

    return

# C


def C():
    N = II()
    S = input()
    c = 0
    count = 0
    for i in S:
        if i != c:
            count += 1
        c = i
    print(count-1)

    return

# D


def D():
    N = II()
    L = LI()
    L.sort()

    count = 0
    for i in range(N-2):

        for j in range(i+1, N-1):

            p = L[i]+L[j]

            count += sum(x < p for x in L)-j-1

    print(count)

    return

# E


def E():
    N, M = LI()
    bit_max = 1 << N
    dp = [[inf for i in range(bit_max)] for j in range(M+1)]
    dp[0][0] = 0

    for i in range(M):
        a, b = LI()

        c = LI()
        bit = 0

        for d in c:
            bit |= 1 << (d-1)

        for w in range(bit_max):

            t = w | bit
            cost = dp[i][w] + a

            dp[i+1][t] = min(dp[i+1][t], cost)

            dp[i+1][w] = min(dp[i][w], dp[i+1][w])

    print(-1) if dp[-1][-1] == inf else print(dp[-1][-1])

    return

# F


def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")


def solution(S):
    # write your code in Python 3.6
    N=len(S)
 
    



    
    pass


# Solve
if __name__ == '__main__':
    A()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# a, b = list(map(int, input().split()))
# s = input()


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

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    input = sys.stdin.readline
    AB = list(map(int, input().split()))
    A = AB[0]
    B = AB[1]

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


if __name__ == '__main__':
    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 = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

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

if __name__ == '__main__':
    a, b = map(int, sys.stdin.readline().strip().split(" "))
    solve(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,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())
print(A*B if A < 10 and B < 10 else -1)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
flg=True
if a<=0 or a>=10:
    flg=False
if b<=0 or b>=10:
    flg=False

if flg:
    print(a*b)
else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np


AB=np.array(input().split(),dtype=np.int32)
A=AB[0]
B=AB[1]

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

print(result)

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)
  else:
    print(-1)
else:
  print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

ans = a * b

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

ans=N[0]*N[1]

if  N[0]<10 and N[1]<10:
    print (ans)
else:
    print(-1)

Submission status: Accepted

Solution code:
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')


A,B = inpl()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(res)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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:
#
# abc144 a
#
import unittest
from io import StringIO
import sys


def input():
    return sys.stdin.readline().rstrip()


def resolve():
    A, B = map(int, input().split())

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


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2 5"""
        output = """10"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """5 10"""
        output = """-1"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """9 9"""
        output = """81"""
        self.assertIO(input, output)


if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
A,B=np.array(list(map(int, input().split())))
if A<=9 and B<=9:
    print(int(A*B))
else:
    print(int(-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:
def f_a():
    a, b = map(int, input().split())
    if a//10>0 or b//10>0:
        print(-1)
    else:
        print(a*b)

if __name__ == "__main__":
    f_a()

Submission status: Accepted

Solution code:
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if a>9 or b>9:
  print(-1)
  exit()
else:
  print(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:
a, b = (int(_) for _ in 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:
import sys

A, B = map(int, sys.stdin.readline().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=int(input())
#A=list(map(int,(input().split())))
A,B=list(map(int,(input().split())))
if (A<10 and B<10):
	print (A*B)
else:
	print(-1)	
#print(A*B)

Submission status: Accepted

Solution code:
import sys

def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
mod = 10**9 + 7
inf = float('inf')
A,B = LI()
ans = int(0)

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

Submission status: Accepted

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

r = 0

if L > 9 or R > 9:
	r = -1
else:
	r = R*L

print(r)

Submission status: Accepted

Solution code:
A_B = input().split()
if (int(A_B[0]) <= 9) & (int(A_B[1]) <= 9):
    print(int(A_B[0]) * int(A_B[1]))
else:
    print(-1)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if (A<10) & (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())
print(a*b if (a<=9)&(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:
import sys
A, B = [int(v) for v in input().split()]

if A < 1 or A > 9 or B < 1 or B > 9:
    print(-1)
    sys.exit(0)
print(A * B)

Submission status: Accepted

Solution code:
import numpy as np


def main():
	A, B = [int(x) for x in input().split()]
	
	if 9 < A:
		print(-1)
		return

	if 9 < B:
		print(-1)
		return

	print(A*B)

if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

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

def Main(a, b):
    if(a > 0 and a < 10 and b > 0 and b < 10):
        return a*b
    else: 
        return -1

def main():
    A, B = map(int, input().split())
    print(Main(A, B))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - 9x9
N,M = map(int, input().split())

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

Submission status: Accepted

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

else:
   print("-1")

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

print(Ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque, defaultdict
import itertools as ite
import sys
import math
import decimal

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

A, B = map(int, raw_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())

ret = 0
if 9 < A or 9 < B:
  ret = -1
else:
  ret = A * B
  
print(ret)

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)