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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

if a > 9:
  out = -1
elif b > 9:
  out = -1
else:
  out = a*b
print(out)

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

Submission status: Accepted

Solution code:

n = list(map(int, input().split()))

if (n[0] < 10)and(n[1]<10):
    print(n[0]*n[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 = map(int, input().split())
ans = -1
if a < 10 and b < 10:
  ans = a * b

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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, open(0).read().split())
# print(A,B)
print(A*B if A<=9 and B<=9 else -1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
num=[1,2,3,4,5,6,7,8,9]
if A in num and B in num:
  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(x) for x in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def Y(a,t = 0):
    if a==t : print('YES')
    else : print('NO')
def y(a, t =0):
    if a==t : print('Yes')
    else : print('No')
def cal(t):
    if 1<= t <10:
        return 1
    else:return 0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def isValid(x):
    return (x > 0 and x < 10)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)


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

Submission status: Accepted

Solution code:
# ABC144 A
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a,b = nl()

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

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

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

Submission status: Accepted

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

if A > 0 and B > 0 and 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 -*-

import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, b) = [int(e) for e in lines[0].split(" ")]

    return (a, b)


def solve(a, b):

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

    return result

def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a > 9 or b > 9:
    a = -1
    b = 1

c = a * b
print(c)

Submission status: Accepted

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

if(max(A,B)>=10):
    print("-1")
else:
    print(A*B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, ns().split()))
ns = lambda: stdin.readline()

a, b = na()

ans = 0
if (a > 0 and a < 10) and (b > 0 and b < 10):
    ans = a * b
else:
    ans = -1    

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:

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

if A >= 10 or B >= 10:
    print('-1')
    exit()

print(A*B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
input = sys.stdin.readline
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 = list(map(int,input().split()))
print(a*b if 1<=a<=9 and 1<=b<=9 else -1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def check(x):
    return 1 <= x <= 9

A, B = [int(str) for str in input().strip().split()]
print(A * B if check(A) and check(B) else -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)

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:
from sys import stdin
A,B = [int(x) for x in stdin.readline().rstrip().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 stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split()) 
DBG = True # and False
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

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

Submission status: Accepted

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

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#ABC144A
import sys
import math
import collections
#sys.setrecursionlimit(100000)


#n=int(input())

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


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

Submission status: Accepted

Solution code:
import sys
from collections import deque,defaultdict
from fractions import gcd
from math import ceil

def N():
    return int(sys.stdin.readline())
def NK():
    return map(int,sys.stdin.readline().split())
def LS_I():
    return [int(x) for x in sys.stdin.readline().split()]
def LS_S():
    return list(input())
def main():
    a,b = NK()
    if a>=10 or b>=10:
        print(-1)
    else:
        print(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:
    answer = a * b
else:
    answer = -1
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

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


def main():
    a, b = (int(z) for z in input().split())
    res = solve(a, b)
    print(res)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


# Run main
if __name__ == '__main__':
    AtCoder().main()

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    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 = (int(x) for x  in 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 or b > 9):
    print("-1")
else:
    print(a*b)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve_a(a, b):
    if max(a, b) > 9:
        res = -1
    else:
        res = a * b
    return res


def main():
    # input
    a, b = map(int, input().split())
    res = solve_a(a, b)
    print(res)


def test():
    assert solve_a(2, 5) == 10
    assert solve_a(5, 10) == -1
    assert solve_a(9, 9) == 81


if __name__ == "__main__":
    test()
    main()

Submission status: Accepted

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

def ri():
    return int(input())

def rl():
    return list(input().split())

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

from sys import stdin, stderr

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

   return 0

if __name__ == '__main__': main()

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 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 and B < 10:
  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(m*n)

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:
    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 and B<=9:
  print(A*B)
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:
def main():
    A, B = [int(x) for x 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 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:
# -*- coding: utf-8 -*-

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

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

if len(a) == 1 and len(b) == 1:
	print("%d" % (int(a)*int(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:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())

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

Submission status: Accepted

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
n, m = map(int, input().split())

flg = 0
if 9 < n :
    flg = 1
if 9 < m :
    flg = 1

if flg:
    print(-1)
else:
    print(n*m)

Submission status: Accepted

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

Submission status: Accepted

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

    # calc

if __name__ == '__main__':
    main()

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:
import sys,collections,math,random;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

ab = Is()
if 0 < ab[0] < 10 and 0 < ab[1] < 10:
    print(ab[0] * ab[1])
else:
    print(-1)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    resolve()

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

Submission status: Accepted

Solution code:
import sys
a, b = map(int, input().split())
if a >= 10 or a <= 0:
    print('-1')
    sys.exit()
if b >= 10 or b <= 0:
    print('-1')
    sys.exit()
print(a * b)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B=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 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')
  exit()
else :
  print(A*B)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if (a < 10) & (b < 10):
    print(a*b)
else:
    print(-1)

Submission status: Accepted

Solution code:
# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()

# int(input())
# map(int, input().split())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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


print(-1)

Submission status: Accepted

Solution code:
A, B = map(str, input().split())
if len(A) == 1 & len(B) == 1:
    print(int(A)*int(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 main():
  a, b = raw_input().split()
  if len(a) > 1 or len(b) > 1:
    print(-1)
    return
  print(int(a)*int(b))

main()

Submission status: Accepted

Solution code:
A,B=map(int, raw_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 max(A, B) <= 9 else -1)

Submission status: Accepted

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


if __name__ == "__main__":
    a, b = map(int, input().split(' '))

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

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:
x,y=[int(x) for x in input().split()]
if (x>9 or y>9):
  print(-1)
  exit()
  
print(x*y)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if N >9 or K>9:
      print(-1)
else:
      print(N*K)

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,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False



a,c = m()

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