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: Runtime Error

Solution code:
n=int(input())
i=1
check=False
while i<int(n**.5+1):
    if n/i<10 and n%i==0:
        print("Yes")
        check=True
        break
    i+=1

if not check:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
i=1
check=False
while i<10:
    if n/i<10 and n%i==0:
        print("Yes")
        check=True
        break
    i+=1

if not check:
    print("No")

Submission status: Runtime Error

Solution code:
n=int(input())
check=False;
i=1
while i<10:
    j=1
    while j<10:
        if (i*j==n):
            print('Yes')
            check=True
            break;
        j+=1;
    if check:
        break
    i+=1


if not check:
    print("No")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
 
int main(){
    int A, B;
    cin >> A >> B;
    
    if(A<=9 && B<=9)
        cout << A*B << endl;
    else
        cout << -1 << endl;

}

Submission status: Runtime Error

Solution code:
n=int(input())

ans="no"

for i in range(9):
  if n%(9-i)==0:
    if n/(9-i)<10:
      ans="yes"
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
import math

for line in sys.stdin:
    a, b, x = list(map(int, line.split(' ')))

    water_height = x / (a*a)

    r = math.atan(water_height/b*2)

    print(math.degrees(r))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import math
a,b,x=map(int,input().split())
if a*a*b/2<x:
  print(math.degrees(math.atan(a*a*b/2*x)))
else:
  print(math.degrees(math.atan(2-2*x/a*a*b)))

Submission status: Runtime Error

Solution code:
    n = int(input())
    b = False
    i=1
    while i<=9:
        j=1
        while j<=i:
            if j*i==n:
                print('Yes')
                b = True
                break
            j+=1
        i+=1
    if b==False:
        print('No')

Submission status: Runtime Error

Solution code:
    n = int(input())
    b = False
    i=1
    while i<=9:
        j=1
        while j<=9:
            if j*i==n:
                print('Yes')
                b = True
                break
            if j*i>n:
                break
            j+=1
        i+=1
    if b==False:
        print('No')

Submission status: Runtime Error

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

if a[0] < 10 && a[1] < 10:
  print(a[0] * a[1])
else:
  print(-1)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
a = sorted(map(int, input().split()))
f = sorted(map(int, input().split()))
time = [f[i] * a[-i-1] for i in range(n)]

sup = max([time[i] - f[i] * k // n for i in range(n)] + [0])
inf = 0
while sup > inf:
  x = (sup + inf) // 2
  train = sum([(max([0, time[i] - x]) + f[i] - 1) // f[i] for i in range(n)])
  if k < train:
    inf = x + 1
  else:
    sup = x
print(sup)

Submission status: Runtime Error

Solution code:
n = int(input())

# コピー
m = n

# 素因数分解
a = []
while n % 2 == 0:
    a.append(2)
    n //= 2
f = 3
while f * f <= n:
    if n % f == 0:
        a.append(f)
        n //= f
    else:
        f += 2
if n != 1:
    a.append(n)


x=1

for i in a[::-1]:
  x *= i
  if x*x >= m:
    break

y = m // x
ans = x + y -2

print(ans)

Submission status: Runtime Error

Solution code:
import math

# 入力
N = int(input())

ans = 10**12
square = math.ceil(math.sqrt(N))
for i in range(1, square):
    if N%i == 0:
        ans = min(ans, int(N/i))
b = int(N/ans)
print(ans + b-2)

Submission status: Runtime Error

Solution code:
from heapq import *
def abc144c():
  n,k=map(int,input().split())
  a=sorted(list(map(int,input().split())))
  f=sorted(list(map(int,input().split())))[::-1]
  q=[] 
  for i,j in zip(a,f):
    heappush(q,(-i*j,j))
  kk=min(k,10**12)
  for i in range(k):
    tmp,key=heappop(q)
    heappush(q,(tmp+key,key))
  ans,key=heappop(q)
  print(max(-ans,0))
abc144c()

Submission status: Runtime Error

Solution code:
N=int(input())
n=N-1
for i in range(1,int(N**(1/2))+1):
    if N%i==0:
      n=min(n,i+N/i-2)
print(int(n))

Submission status: Runtime Error

Solution code:
import numpy as np

N,K=map(int,input().split())
A=np.array(list(map(int,input().split())))
B=np.array(list(map(int,input().split())))

AA=np.sort(A)
BB=np.sort(B)[::-1]
S=np.sum(A)
CC=np.array([AA[i]*BB[i] for i in range(N)])
if K>S:
    K=S

for j in range(K):
    m=np.argmax(CC)
    AA[m]-=1
    CC[m]=AA[m]*BB[m]
print(np.max(CC))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import bisect

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
F = list(map(int, input().split()))
A.sort()
F.sort(reverse=True)
if sum(A) <= K:
    print(0)
else:
    left = 0
    right = max([A[i]*F[i] for i in range(N)])
    while left + 1 != right:
        mid = int((left + right) / 2)
        train_n = sum([A[i]-mid//F[i] for i in range(N)])
        if train_n > K:
            left = mid
        else:
            right = mid
    print(right)

Submission status: Runtime Error

Solution code:
i = int(input())
list = []

if i % 2 == 0:
    for m in range(2, int((i+2)/2) + 1):
        if i % m == 0:
            list.append(m + i / m)

if i % 2 == 1:
    for m in range(1, int((i+1)/2), 2):
        if i % m == 0:
            list.append(m + i / m)


list.sort()
print(int(list[0]-2))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
m = int(input())
if (n>0 or n<10) and (m>0 or m<10):
    print(n*m)
else:
    print("-1")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
N = int(input()) 
factor = []
tmp = int(math.sqrt(N)) + 1
list = range(2,tmp)
for num in list[::-1]:
    while N % num == 0:
        N //= num
        factor.append(num)
        factor.append(N)
    if not factor:
        factor.append(N)
        factor.append(0)
    else:
        pass
    break
f=sum(factor)-1
print(f)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    divisors = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)

    # divisors.sort()
    return divisors

N = int(input())
if make_divisors(N)[0] < 10 and make_divisors(N)[1] < 10:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
class Main() :
	A = input("")
	B = input("")

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!
x=input()
y=input()

if x<=0 or x>=10 or y<=0 or y>=10:
    print("-1")
else:
    print(x*y)

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
a = list(map(int,input().split()))
f = list(map(int,input().split()))
a.sort()
f.sort()
ok = max(a)*max(f)
ng = -1

while ok-ng > 1:
    mid = (ok+ng)//2
    t = 0
    for i in range(n):
        t += max(0,a[i]-int(mid/f[i]))
    if t > k:
        ng = mid
    else:
        ok = mid

print(ok)

Submission status: Runtime Error

Solution code:

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

import math
c=(a*a*b-x)*2

if c<a*a*b:
  d=c/(a*a)
  print(math.degrees(math.atan(d/a)))
else:
  f=(2*x)/a*b 
  print(math.degrees(math.atan(b/f)))

Submission status: Runtime Error

Solution code:
A = input("")
B = input("")

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

Submission status: Runtime Error

Solution code:
n = int(input())

divisors = []
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
        divisors.append(i)
        if i != n // i:
            divisors.append(n // i)
a = divisors[-1]
b = divisors[-2]
print(a + b - 2)

Submission status: Runtime Error

Solution code:
A = input("")
B = input("")

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

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int, input().split())
 
h = x / (a * a) #height 
if h > b / 2:
  shahen = 4 * (b - x/(a * a) * (b - x/(a * a))) + a * a
  sin = a / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))
elif h == b / 2:
  print(45.0000000000)
else:
  shahen = 4 * x * x + (a * a * a * a) * b * b
  sin = 2 * x / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())
if x / a >= (a*b/2):
    print(math.degrees(math.atan((2*b/a)-2*x/(a**3))))
else:
    if a < b:
        print(math.degrees(math.atan(a*b*b/(2*x))))
    else:
        print(math.degrees(math.atan(2*x/(a*b*b))))

Submission status: Runtime Error

Solution code:
str = input().rstrip().split("")
print(int(str[0]) * int(str[1]))

Submission status: Runtime Error

Solution code:

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

n=int(input())
F = [1]
for i, j in factorization(n):
    for _ in range(j):
        F.append(i)
import itertools
ans = 9999999999999
for flags in itertools.product([0,1], repeat=len(F)):
    a = 1
    b = 1
    for i in range(len(F)):
        if flags[i]:
            a *= F[i]
        else:
            b *= F[i]
    tmp = (a-1) + (b-1)
    if tmp < ans:
        ans = tmp
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
x = []
result = "No"
for i in range(1, 10):
    for j in range(i, 10):
        x.append(i*j)
print(x)
if N in x:
    result = "Yes"
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
if a >= 1 and b >= 1 and a <= 9 and b <= 9:
    print("Yes")
    exit()
print("No")

Submission status: Runtime Error

Solution code:
int(input("9:"))
for A in range(1, num + 1):
  for B in range(1, num + 1):
    print("{}＊{}={}".format(A,B,A＊B))

Submission status: Runtime Error

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
import heapq
n,k=map(int,input().split())
a=list(map(int,input().split()))
f=list(map(int,input().split()))
a.sort()
f.sort()
ans=[]
for i in range(n):
    ans.append([f[i]*a[n-i-1]*-1,a[n-i-1]*-1])
heapq.heapify(ans)
# print(ans)
for i in range(k):
    tmp=heapq.heappop(ans)
    # print(tmp)
    if tmp[1]==0:
        heapq.heappush(ans,tmp)
        break
    tmp[0]=tmp[0]//tmp[1]
    tmp[1]+=1
    tmp[0]=tmp[0]*tmp[1]
    heapq.heappush(ans,tmp)
cnt=0
for i in range(n):
    cnt=max(cnt,ans[i][0]*-1)
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = input(int())
B = input(int())
if 0<A<=20 and 0<B<=20:
  print(A*B)
else:
  print(-1)

Submission status: Runtime Error

Solution code:

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
  
def prod(n):
  result = 1
  for x in n:
    result *= x
  return result
  
a = prime_factorize(n)
b = [a.pop(-1)]

while prod(a) > prod(b):
  prev_result = prod(a) + prod(b)
  b.append(a.pop(0))

  if prev_result < prod(a) + prod(b):
    a.append(b.pop(-1))
    break
  
print(prod(a)-1 +prod(b)-1)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import collections
A= int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
  
primelist=make_divisors(A)
S = primelist[-1]
G = int(A/S)
print((G-1)+(S-1))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = int(input("输入A的值："))
B = int(input("输入B的值："))
product = 0
if(1<= A <= 9 and 1<= B <= 9):
    product = A * B
    print('%d*%d=%-2d'%(A,B,product))
else:
    print("-1")

Submission status: Runtime Error

Solution code:
import math
n = int(input())
sq = math.floor(pow(n, 0.5))
flg = False
for i in range(2, sq):
    if n % i == 0:
        flg = True
        break
if flg:
    print(sq * 2 - 1)
else:
    print(n - 1)

Submission status: Runtime Error

Solution code:
N = int(input())  
count = [N-1]
for i in range(2, N+1):
  if N%i==0:
    count.append(int(i + N/i -2))
    print(min(count))
    break

Submission status: Runtime Error

Solution code:
N = int(input())

a = []
while N % 2 == 0:
  a.append(2)
  N //= 2
f = 3
while f * f <= N:
  if N % f == 0:
    a.append(f)
    N //= f
  else:
    f += 2
if N != 1:
  a.append(N)

A = 1
B = 1
for i in a:
  if(A > B):
    B *= i
  elif(B > A):
    A *= i
  else:
    A *= i
print(A + B - 2)

Submission status: Runtime Error

Solution code:
import math
n=int(input())
ans=1
for i in reversed(range(2,int(math.sqrt(n)))):
    if n%i==0 and abs(n/ans-ans)>abs(n/i-i):
        ans=n/i
            
print(int(ans-1+n/ans-1))

Submission status: Runtime Error

Solution code:
N = int(input())
if N%2==1:
  print(N-1)
else:
  ans = []
  for i in range(1,N):
    for j in range(1,N):
      cnt=0
      if i*j==N:
        cnt +=i-1
        cnt +=j-1
        ans.append(str(cnt))
  ans=min(ans)
  print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())

def divisor(n):
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table
 
if len(divisor(N)) < 3:
    print(N - 1)
else:
    divisor_list = divisor(N)
    tmp = N
    for i in divisor_list:
        A = i
        B = N / i
        if tmp > (A + B - 2):
            tmp = (A + B - 2)
    print(int(tmp))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a = int(input())
list1 = []
for i in range(9):
  for j in range(9):
    list1.append((i+1)*(j+1))
b = len(list1)
flag = 0
for k in range(b):
  if a == list1[k]:
    flag = 1
    break;
if flag == 1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import math
n = int(input())

for i in range(int(math.sqrt(n)), 0, -1):
    if n % i == 0:
        num = i
        break
        
ans = int(num -1 + (n / num) -1)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def input_int:
    hoge = input().split()
    A = int(hoge[0])
    B = int(hoge[1])
    return A, B

if __name__ == "__main__":
    A, B = input_int()
    if A >=10 && B >= 10:
        ret = A * B
    else:
        ret = -1
    print(ret)

Submission status: Runtime Error

Solution code:
import sys

for line in sys.stdin:
    N = int(line)
    found=False
    for i in range(1, 10, 1): 
        if N % i == 0 and N // i <= 9:
            found = True
            break
    if found:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(1, 10):
    if N % i == 0 and N / i <= 9:
        print('Yes')
        exit(0)
print('No')

Submission status: Runtime Error

Solution code:
num = int(input())
Flag = False
for x in range(1,10):
    for y in range(x,10):
        if x * y == num:
            Flag = True
            break
    if Flag == True:
        break

if Flag:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
data = input().split()

if data[0] < 10:
  if data[1] < 10:
    answer = data[0]*data[1]
    
return answer

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(4100000)
import heapq
n, k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
f = [int(i) for i in input().split()]
a.sort()
f.sort(reverse=True)

if sum(a) <= k:
    print(0)
else:
    heap = []
    for i in range(n):
        heapq.heappush(heap, (-a[i]*f[i], a[i], f[i]))
    for i in range(k):
        cur,x,y = heapq.heappop(heap)
        x -= 1
        cur = x*y
        heapq.heappush(heap,(-cur,x,y))
    ans = -float('inf')
    for i in range(len(heap)):
        ans = max(-heap[i][0], ans)
    print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
abc = input()
abc_int = int(abc)
prolist = []
chk = int(abc_int**0.5)+2
for c1 in range(chk):
	if abc_int % c1 == 0:
		prolist.append(c1+abc_int//c1-2)
print(min(prolist))

Submission status: Runtime Error

Solution code:
num = int(input())
Flag = False
for x in range(2,10):
    for y in range(x,10):
        print("x"+str(x)+":y"+str(y))
        if x * y == num:
            Flag = True
            break
    if Flag == True:
        break

if Flag:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import math
n=int(input())
l=[0]
b=0
for i in range(1,n,1):
  if n%i==0 and n/i>=i:
    a=i+(n/i)
    l.append(a)
  else:
    b+=1
    
c=min(l)  
print(c-2)

Submission status: Runtime Error

Solution code:
n = int(input())
min = n+1
kaisu = int((n/4)-1)

for i in range(kaisu):
    if n%(i+1)==0:
        tmp = i+(n/(i+1))-1
        if min > tmp:
            min = tmp
    if (i+1)**2>n:
        break

print(int(min))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B = input()
o = -1
if A >= 10 or B>=10
    print(o)
else:
print(A*B)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
 
for i in range(1,10):
  if(n%i == 0 and n/i <10):
    print('Yes')
    break
else:
  print('No')

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
if a>9 OR b>9:
  print("-1")
elif:
  c=a*b
  print(c)

Submission status: Runtime Error

Solution code:
A, B = list(map(int, (input().split())))
k = -1
if A <= 9 && B <= 9:
  k = A * B
print(str(k))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
list = [1,2,3,4,5,6,7,8,9,10,12,14,16,18,15,21,24,27,20,28,32,36,25,35,40,45,30,42,48,54,49,56,63,64,72,81]
for N in list:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
num = int(input())
Flag = True
for x in range(2,10):
  if num % x == 0:
    Flag = False
    break
if flag:
  print("NO")
else:
  print("YES")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())


def times (x,y):
    if x <=20 and x >=1 and y >=1 and y <=20:
        print (x * y)
    else:
        print (-1)

times(a,b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = int(input())
count = 0
 
for i in range(2,10):
  if x % i == 0 and (x // i) <= 9:
    print("Yes")
    exit()
  else:
    count += 1
 
if count == 8:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input().split()
if A > 10 or B > 10:
  print(1)
else:
  print(A * B)

Submission status: Runtime Error

Solution code:
n=int(input())
a=0
for i in range(9):
  for j in range(9):
    if n==(i+1)*(j+1):
      print("Yes")
      a+=1
      break
  if a!=0:
    break
if a==0:
  print("No")

Submission status: Runtime Error

Solution code:
a,b = int(x) for x in 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: Runtime Error

Solution code:
n = int(input())
ans = 0
flg = False

for i in range(10)[1:]:
  ans = n/i
  r = n%i
  if(ans<10 and r ==0):
    flg = True
    break
if(flg):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

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

Submission status: Runtime Error

Solution code:
n = int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors
  
ans = n
yakusuu = make_divisors(n)
for i in range(0 ,len(yakusuu), 2):
    kari = yakusuu[i] -1 + yakusuu[i+1]-1
    if (ans > kari):
        ans = kari
print(ans)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;

int main()
{
    int a,b;
    cin>>a;
    cin>>b;
    if((a>=1 && a<=9) && (b>=1 && b<=9))
    {
        cout<<a*b;
    }
    else
    {
        cout<<-1;
    }
    return 0;
}

Submission status: Runtime Error

Solution code:
s = input().split()
if A > 10 or B > 10:
  print(1)
else:
  print(a * b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

from sys import stdin

n = int(stdin.readline().rstrip())
l = [1,2,3,4,5,6,7,8,9,2,4,6,8,10,12,14,16,18,3,6,9,12,15,18,21,24,27,4,8,12,16,20,24,28,32,36,5,10,15,20,25,30,35,40,45,6,12,18,24,30,36,42,48,54,7,14,21,28,35,42,49,56,63,64,72,81]
ans = n in l
if ans == True:
    ans = "Yes"
else:
    ans = "No"
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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


def solve(A: int, B: int):
    
   	if A > 9 or B > 9:
      print(-1)
    else:
      print(A * B)
    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(N, L)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import math
n = int(input())
n1 = int(math.sqrt(n))
cnt = 10**18
for i in range(1, n1+1):
  if n % i == 0:
      j = (n/i) - 1
      ans = i-1
      cnt = min(cnt, j+ans)
  else:
    continue
print(int(cnt))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

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

Submission status: Runtime Error

Solution code:
a, b = int(input())

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print({}.ans)
else :
    print(str(-1))A, B = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print(ans)
else :
    print(str(-1))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B = (int(i) for i in input().split())  
if 1 <= A < 10 and  1 <= B < 10 :
    ans = A * B
    print({}.ans)
else :
    print(str(-1))

Submission status: Runtime Error

Solution code:
a=int(input(""))
b=int(input(""))

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
  int A, B;
  cin >> A;
  cin >> B;
  if (A < 1 || A > 10 ||  B < 1 || B > 10){
    cout << "-1" << endl;
  }
  cout << A * B << endl;
}

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

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

Submission status: Runtime Error

Solution code:

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:

from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().split()]
if A<1 or A>9 B<1 or B>9:
    ans = -1
else:
    ans = A*B

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = input().split()
a= int(a)
b = int(b)
if a in range(1,9);
 if b in range(1,9);
  print(a*b)
else:
  print("-1")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a = input().split()
 
if a[0]>=10 or a[1]>=10:
  return -1
else:
  return a[0]*a[1]

Submission status: Runtime Error

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

Submission status: Runtime Error

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