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:

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env pypy
from __future__ import division, print_function
from collections import defaultdict, Counter, deque
from future_builtins import ascii, filter, hex, map, oct, zip
from random import randint
from itertools import imap as map, izip as zip, permutations, combinations, combinations_with_replacement
from __builtin__ import xrange as range
from math import ceil
from _continuation import continulet
from cStringIO import StringIO
from io import IOBase
import __pypy__
from bisect import bisect, insort, bisect_left, bisect_right
import sys
import os
import re
sys.setrecursionlimit(9999)
inf = float('inf')
mod = int(1e9) + 7
mod_ = 998244353
N = 5001
 
'''
Check for special cases (n=1)
One wrong submission = 10 mins penalty!
do smth instead of nothing and stay organized
'''

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


BUFSIZE = 8192
class FastI(IOBase):
	def __init__(self, file):
		self._fd = file.fileno()
		self._buffer = StringIO()
		self.newlines = 0
 
	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
		self.newlines = 0
		return self.buffer.read()
 
	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count("\n") + (not b)
			ptr = self._buffer.tell()
			self._buffer.seek(0, 2), self._buffer.write(
				b), self._buffer.seek(ptr)
		self.newlines -= 1
		return self._buffer.readline()
class FastO(IOBase):
	def __init__(self, file):
		self._fd = file.fileno()
		self._buffer = __pypy__.builders.StringBuilder()
		self.write = lambda s: self._buffer.append(s)
 
	def flush(self):
		os.write(self._fd, self._buffer.build())
		self._buffer = __pypy__.builders.StringBuilder()
def print(*args, **kwargs):
	sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop("end", "\n"))
	if kwargs.pop("flush", False):
		file.flush()
def gcd(x, y):
	while y:
		x, y = y, x % y
	return x
sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
def input(): return sys.stdin.readline().rstrip("\r\n")
if __name__ == "__main__":
	def bootstrap(cont):
		call, arg = cont.switch()
		while True:
			call, arg = cont.switch(to=continulet(
				lambda _, f, args: f(*args), call, arg))
	cont = continulet(bootstrap)
	cont.switch()
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

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

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

Submission status: Accepted

Solution code:
# import sys
# sys.setrecursionlimit(200000)

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b=LI()
  if a>9:
    return -1
  if b>9:
    return -1
  return a*b

# main()
print(main())

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

if n < 10 and m < 10:
    print(n*m)
else:
    print(-1)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(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 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:
import sys
def input():
    return sys.stdin.readline()[:-1]
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:
n, m = (int(_) for _ in input().split())
if max(n,m) >= 10:
    print(-1)
else:
    print(n*m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def main():
    Input = [input() for i in range(1)]
    #N = int(Input[0])
    A,B = list(map(int,Input[0].split()))
    if A>9 or B>9:
        print(-1)
    else:
        print(A*B)
    


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    A, B = (int(i) for i in input().split())
    if A > 9 or B > 9:
        print(-1)
    else:
        print(A*B)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000)
from math import factorial, ceil, floor
from bisect import bisect_right as bsr
from operator import itemgetter as ig
from collections import defaultdict as dd
from collections import deque, Counter as cnt

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)
def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]
def nlist(n, v):
    if not n: return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]

# エントリーポイント
def main():
    A, B = input(int, int)
    if A < 1 or 9 < A or B < 1 or 9 < B:
        print(-1)
    else:
        print(A * B)
    
    return

if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))

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:
import sys
input = sys.stdin.readline


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b = map(int, input().split())
if a >= 10 or b >= 10:
    print(-1)
else:
    print(a * b)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

INF = float("inf")

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

#処理内容
def main():
	A, B = getlist()
	if A < 10 and B < 10:
		print(A * B)
	else:
		print(-1)

if __name__ == '__main__':
	main()

Submission status: Accepted

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

if (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())
print(A*B if A<=9 and 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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = 10**9

a, b = [int(item) for item in input().split()]
if a < 10 and b < 10:
    print(a*b)
else:
    print(-1)

Submission status: Accepted

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# abc144_a

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


def input():
    return stdin.readline()[:-1]


def intput():
    return int(input())


def sinput():
    return input().split()


def intsput():
    return map(int, sinput())


a, b = intsput()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#%%
a, b = map(int, input().split())
if a <= 9 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:
words = lambda t : list(map(t, input().split()))
a,b = words(int)

if a > 9 or b > 9:
    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:
def read_values():
    return map(int, input().split())


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


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


if __name__ == '__main__':
    f()

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
if max(A) > 9:
  print(-1)
else:
  print(A[0] * A[1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
  a, b = na()
  if a > 9 or b > 9:
    print(-1)
    return
  print(a * b)

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

a,b = IL()
if max(a,b) > 9:
  print(-1)
else:
  print(a*b)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

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

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
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 A > 9 or B > 9:
        print(-1)
    else:
        print(A*B)




if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().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:
# -*- coding: utf-8 -*-

def readInts():
  return [int(s) for s in input().split(" ")]

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

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

if __name__ == "__main__":
  main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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())
if x < 10 and y < 10:
    ans = x * y
else:
    ans = -1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

A,B = II()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def input():
    import sys
    return sys.stdin.readline().rstrip()


def main():
    import math
    import collections
    import itertools

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
# from bisect import *
# from collections import *
# from heapq import *
# import itertools
# import math
# INF = 10**9
# MOD = 10**9+7

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x,y = map(int,input().split())	
if x<=9 and y<=9:
    print(x*y)
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:
#!/usr/bin/python3
# -*- coding: utf-8 -*-


A,B = map(int, input().split())
if max(A,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:
#!/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


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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

Submission status: Accepted

Solution code:
import sys, re, os
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
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 S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, atan2
from operator import mul
from functools import reduce
sys.setrecursionlimit(10**8)

INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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

Submission status: Accepted

Solution code:
# coding:utf8
from collections import  Counter

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

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

Submission status: Accepted

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


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



    
            
    

    

    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

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

A, B = MAP()

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

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