Problem:


Score : 100 points

Problem Statement

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

Given are two integers A and B.

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

Constraints

1 \leq A \leq 20

1 \leq B \leq 20

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

2 5

Sample Output 1

10

2 \times 5 = 10.

Sample Input 2

5 10

Sample Output 2

-1

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

Sample Input 3

9 9

Sample Output 3

81



Sample input:
2 5


Sample output:
10

Submission status: Accepted

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

Submission status: Accepted

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

def main():

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

    if A <= 9 and B <= 9:
        ans = A * B

    else:
        ans = -1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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 = 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:
# abc144_a.py
# https://atcoder.jp/contests/abc144/tasks/abc144_a

# A - 9x9 /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# 高橋君は九九を覚えたので、1以上 9 以下の 2つの整数の積を計算することができます。それ以外の計算はできません。
# 2つの整数 A, Bが与えられます。
# 高橋君が A×Bを計算できるならその結果を、できないなら代わりに -1 を出力してください。

# 制約
#     1≤A≤20
#     1≤B≤20
#     入力中のすべての値は整数である。

# 入力
# 入力は以下の形式で標準入力から与えられる。
# A B

# 出力
# 高橋君が A×Bを計算できるならその結果を、できないなら -1 を出力せよ。

# 入力例 1
# 2 5

# 出力例 1
# 10

# 2×5は 10です。

# 入力例 2
# 5 10

# 出力例 2
# -1

# 5×10は 50ですが、高橋君には計算できないので、かわりに -1 を出力します。

# 入力例 3
# 9 9

# 出力例 3
# 81


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    # N = int(lines[0])
    A, B = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    if A > 9 or B > 9:
        result = -1
    else:
        result = A*B

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2 5']
        lines_export = [10]
    if pattern == 2:
        lines_input = ['5 10']
        lines_export = [-1]
    if pattern == 3:
        lines_input = ['9 9']
        lines_export = [81]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

Solution code:
import math
import collections
import fractions
import itertools
import functools
import operator

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Submission status: Accepted

Solution code:
#n = int(input())
a, b = map(int, input().split())
#l = list(map(int, input().split()))
#s = input()

ans = 0

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

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

else:
    print(a * b)

Submission status: Accepted

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

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if not ( 1 <= A <= 20 ): sys.exit()
if not ( 1 <= B <= 20 ): sys.exit()
if not (isinstance(A,int) and isinstance(B,int)): sys.exit()

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>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 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()) 
l = [1,2,3,4,5,6,7,8,9]

if a in l and b in l:
    print(a*b)
else:
    print('-1')

Submission status: Accepted

Solution code:
numz = input()
count = 0
numz_pair = numz.split(" ")
numz_pair = list(map(int, numz_pair))

for i in range(len(numz_pair)):
    if numz_pair[i] <= 9:
        count = count + 1
    else:
        print(-1)
        break

if count == len(numz_pair):
    print(numz_pair[0]*numz_pair[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:
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())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
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())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

a=int(a)
b=int(b)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")

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

Submission status: Accepted

Solution code:
s = raw_input()
s = s.split(' ')

a, b = int(s[0]), int(s[1])

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

Submission status: Accepted

Solution code:
s = raw_input()
a,b = s.split(' ')
a,b = int(a),int(b)

def mul(a,b):
    if a <= 9 and a >=1 and (1 <= b <= 9):
        return a * b
    else:
        return -1

print mul(a,b)

Submission status: Accepted

Solution code:
s = raw_input()
a,b = s.split(' ')
a,b = int(a),int(b)

def mul(a,b):
    if a <= 9 and a >=1 and (1 <= b <= 9):
        return a * b
    else:
        return -1

print(mul(a,b))

Submission status: Accepted

Solution code:
s = raw_input()
n1,  n2 = s.split()
n1 = int(n1)
n2 = int(n2)
flag = True
if n1 < 0 or n1 > 9:
	flag = False
if n2 < 0 or n2 > 9:
	flag = False
if flag:
	print n1 * n2
else:
	print -1

Submission status: Accepted

Solution code:

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

count = (1,2,3,4,5,6,7,8,9)

if a not in count or b not in count:
    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 print(-1)

Submission status: Accepted

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

A,B = list(input().rstrip().split())
print( -1 if len(A) >1 or len(B) > 1 else eval(A+'*'+B))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# from collections import Counter
# n = int(input())
# li = list(map(int, input().split()))
a, b = map(int, input().split())

# n = int(input())

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

Submission status: Accepted

Solution code:
a,_,b,*c=input()
print(-(c>[])or int(a)*int(b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
a,b = readInts()
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 1 <= a <= 9 and 1 <= b <= 9:
    print(a*b)
else:
    print(-1)

Submission status: Accepted

Solution code:
# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

a,b=MI()
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:
import sys


# input = sys.stdin.readline

def main():
    A,B = map(int,input().split())
    if A//10 +B//10 >0:
        print(-1)
    else:
        print(A*B)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,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:
#!/usr/bin/env python3
a, b = map(int, input().split())
print(a * b * (a < 10 and b < 10) or -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 = [int(a) for a in input().split()]
if a>9 or b>9:
  print(-1)
elif 1<=a<=9 and 1<=b<=9:
  print(a*b)

Submission status: Accepted

Solution code:
a,b = input().split()
if len(a) + len(b) == 2:
    print(int(a) * int(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:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    return


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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

A,B = map(int,S().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(A*B)
else:
  print(-1)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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