Problem:


Score : 100 points

Problem Statement

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

Given are two integers A and B.

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

Constraints

1 \leq A \leq 20

1 \leq B \leq 20

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

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

Sample Input 1

2 5

Sample Output 1

10

2 \times 5 = 10.

Sample Input 2

5 10

Sample Output 2

-1

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

Sample Input 3

9 9

Sample Output 3

81



Sample input:
2 5


Sample output:
10

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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 A > 9 or B > 9:
	print(-1)
else:
	print(A*B)

Submission status: Accepted

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


def main():
    A, B = map(int, input().split())
    print(A * B if all([A < 10, B < 10]) else -1)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if len(str(a)) >= 2 or len(str(b)) >= 2: 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 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())

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

Submission status: Accepted

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

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

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:
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 A<=9 and B<=9 else -1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(str, input().split())
ans = -1

if len(A) == 1 and len(B) == 1:
    ans = int(A) * int(B)

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=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 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());print(a * b) if max(a, b) <= 9 else print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
if len(a)+len(b) != 2:
  print(-1)
else:
  print(int(a)*int(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 = [int(i) for i in input().rstrip().split(' ')]
if A > 9 or B > 9:
  print("-1")
else:
  print(A*B)

Submission status: Accepted

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

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(n*m if max(n,m)<10 else -1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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
row = sys.stdin.readline

def read_ints(row):
    return list(map(int, row().split()))

A,B = read_ints(row)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = -1

if A >= 1 and A < 10:
  if B >= 1 and B < 10:
    ans = A * B
  
print(ans)

Submission status: Accepted

Solution code:
import sys

def propare():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))
    B = int(next(tokens))

    solve(A, B)

def solve(A: int, B: int):
    if A < 10 and B < 10 :
        print(A * B)
    else:
        print(-1)


    return


 
if __name__ == "__main__":
    propare()

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

Submission status: Accepted

Solution code:

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

else:
    print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(res)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

s = -1

if (a < 10) & (b < 10):
  s = a * b
  
print(s)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if A>=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())
C = A*B
if A <= 9 and B <= 9:
    print(C)
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 LI():
  return [int(s) for s in input().split()]

A,B = LI()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 A<10 and B<10 else -1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

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:
#!/usr/bin/env python3

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools

def main():
    A, B = map(int, input().split())
    if (A > 9) | (B > 9):
        print(-1)
    else:
        print(A * B)
    return 0
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 8, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B = map(int, readline().decode('utf8').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:
    C = A*B

else:
    C = -1
print(C)

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)

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


def solve(inp):
    (A, B) = map(int, inp.readline().strip().split(' '))

    if A >= 10 or B >= 10:
        return "-1"
    else:
        return str(A * B)


def main():
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()

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())
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:
ns = input().split(" ")
a = int(ns[0])
b = int(ns[1])
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())
print(-1 if max(a,b) > 9 else 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 os
os.system(r"ruby -e 't=gets.split(" ").map{|i|i.to_i};print t.all?{|i|i<10}?t.inject(:*):-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:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
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 list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


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

    return a*b


print(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:
x, y = map(int, input().split())
print(x*y if x<10 and x>0 and y<10 and y>0 else -1)

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if a<=9 and b<=9:
        print(a*b)
    else:
        print(-1)
if __name__ == '__main__':
    do()

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
def ints():
  return [int(x) for x in input().split()]
def ii():
  return int(input())

a, b = ints()

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

Submission status: Accepted

Solution code:
numbers = input().split()
numA = int(numbers[0])
numB = int(numbers[1])
if numA <= 9 and numB <= 9:
  print(numA * numB)
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) & (B<10):
  print(A*B)
else:
  print(-1)

Submission status: Accepted

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

Submission status: Accepted

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

ans = -1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

d = a*b

if a >= 10 or b >= 10:
    print("-1")
elif a <= 0 or b <= 0:
    print("-1")
else:
    print(d)

Submission status: Accepted

Solution code:
def main():
	# a,b,k = map(int,input().split())
	n,k = map(int,input().split())
	# s = int(input())
	# a = list(map(int,input().split()))
	# rsp = list(str(input()))
	# l = [list(map(int, input().split())) for _ in range(n-1)]
	# s = list(s)
 
	if n < 10 and k < 10:
		print(int(n*k))
	else:
 		print(-1)
 
 
if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
ans = -1

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

    if A > 0 and A < 10 and B > 0 and B < 10:
        ans = A*B
except:
    pass

print(ans)

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


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

    return a, b


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


if __name__ == '__main__':
    input = read()
    print(solve(*input))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
print(a*b if a<10 and b<10 else -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 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>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 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:
import sys
from collections import defaultdict, deque
import bisect
from heapq import *
sys.setrecursionlimit(200000)
input = sys.stdin.readline

N, M = map(int, input().split())
# gx, gy, = map(int, input().split())
# N = int(input())
# L = [int(v) for v in input().split()]
# L = [[int(v) for v in input().split()] for _ in range(N)]
# L = [int(input()) for _ in range(N)]
# L = [list(input().strip())  for _ in range(N)]
# S = input().strip()

if N >= 10 or M >= 10:
    print(-1)
else:
    print(N * M)

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

Submission status: Accepted

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

if A < 10 and B < 10:
  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(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 = list(map(int,input().split(" ")))
if max(A) > 9:
	print("-1")
else:
	print(str(A[0] * A[1]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = [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 a <=9 and b <= 9:
  s = a*b
else:
  s = -1
print(s)

Submission status: Accepted

Solution code:
x, y = [int(i) for i in 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>9 or b>9:
  print("-1")
else:
  print(a*b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = input().split()
data_int = [int(data[i]) for i in range(2)]

if(data_int[0] >= 10 or data_int[1] >= 10):
    print(-1)
else:
    print(data_int[0] * data_int[1])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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