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:
answer = {
    "1":[1,2,3,4,5,6,7,8,9],
    "2":[2,4,6,8,10,12,14,16,18],
    "3":[3,6,9,12,15,18,21,24,27],
    "4":[4,8,12,16,20,24,28,32,36],
    "5":[5,10,15,20,25,30,35,40,45],
    "6":[6,12,18,24,30,36,42,48,54],
    "7":[7,14,21,28,35,42,49,56,63],
    "8":[8,16,24,32,40,48,56,64,72],
    "9":[9,18,27,36,45,54,63,72,81]
}

N = int(input())
a = 0
for value in answer.values():
  if N in value:
    a = 1

if a == 1:
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(1, 10):
    for j in range(1, 10):
        if i * j == N:
            break
    if i * j == N:
        print("Yes")
        break
    elif i == 9 and i * j != N:
        print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
 
for i in range(1,10):
  for j in range(1,10):
    if i*j==N:
      break
  if i*j==N:
    print("Yes")
    break
  elif i==9 and i*j!=N:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
 
for i in range(1,10):
  for j in range(1,10):
    if i*j=N:
      break
  if i*j=N:
    print("Yes")
    break
  elif i==9 and i*j!=N:
    print("No")

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:
N,K=input().split()
N,K=[int(N),int(K)]
A=list(map(int,input().split()))
F=list(map(int,input().split()))

A=sorted(A)
F=sorted(F,reverse=True)
time=list()

for i in range(N):
   time.append(A[i]*F[i])

goal_max=max(time)
goal_min=0
goal_ave=int((goal_max+goal_min)/2)
goal=int((goal_max+goal_min)/2)

col={"-1":"NG"}
for i in range(goal_max+1):
   col[str(i)]=None

flag=True

while(flag):
   counter=0
   print(goal)
   for i in range(N):
      counter+=(A[i]-int(goal/F[i]))

   if(counter<=K):
      if col[str(goal-1)]=="NG":
         print(goal)
         flag=False
      else:
         col[str(goal)]="OK"
         if goal==int((goal+goal_ave)/2):
            goal=int((goal+goal_ave)/2)-1
            print("b")         
         #elif goal!=goal_ave:
         #   goal=int((goal+goal_ave)/2)
         #   print("a")
         else:
            goal=int((goal+goal_min)/2)
            print("c")

   elif(counter>K):
      if col[str(goal+1)]=="OK":
         print(goal+1)
         flag=False
      else:
         col[str(goal)]="NG"
         if goal==int((goal+goal_ave)/2):
            goal=int((goal+goal_ave)/2)+2
         #elif goal!=goal_ave:
         #   goal=int((goal+goal_ave)/2)    
         else:
            goal=int((goal+goal_max)/2)

Submission status: Runtime Error

Solution code:
number_1 = int(input())
number_2 = int(input())
if number_1>9 or number_2>9:
  print(-1)
else:
  print(number_1*number_2)

Submission status: Runtime Error

Solution code:
number_1 = int(input())
number_2 = int(input())
if number_1>9 or number_2>9:
  print("-1")
else:
  print(str(number_1*number_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 = input()
B = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
    a,b = map(int,input().split())
     
    if a > 9 or b > 9:
      print(-1)
    else:
      out = a * b
      print('{0}'.format(out))

Submission status: Runtime Error

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

if a > 9 or b > 9:
  print(-1)
else:
  out = a * b
  print('{0}'.format(out))

Submission status: Runtime Error

Solution code:
def takahashi(A,B):
    if A and B >= 1:
        if A and B <= 9:
            print(A * B)
        else:
            print('-1')
    else:
        print('-1')

A = int(input('数字を入力してくださいA'))
B = int(input('数字を入力してくださいB'))

takahashi(A,B)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
 
def takahashi:
  if A and B >= 1:
  	if A and B <= 9:
    
    else print('-1')
    	print(A * B)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def calc(string_line)
  nums = string_line.split(' ').map(&:to_i)

  if nums.any?{|i| i >= 10}
    -1
  else
    nums.inject(&:*)
  end
end

puts calc(gets)

Submission status: Runtime Error

Solution code:
def calc(string_line)
  nums = string_line.split(' ').map(&:to_i)

  if nums.any?{|i| i >= 10}
    -1
  else
    nums.inject(&:*)
  end
end

calc(gets)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(8):
    if(n/(i+2)<=9 and (n/(i+2)).is_integer()==True):
        print("Yes")
        exit()
print("No")

Submission status: Runtime Error

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

if a<=20 or a>=1 or b<=20 or a>=1:
    print(str(-1))
    
else:
    print(a*b)

Submission status: Runtime Error

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

if A>=1 and A<=20 and B>=1 and B<=20
   result=A*B
   print(str(result))
    
else
   print(str(-1))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())

products = []

for i in range(1,10):
    for j in range(1,10):
        products.append(i*j)

if N in products:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import math

a,b,x = (int(num) for num in input().split())
suf2 = a*b
vol = a*a*b
if (vol/2)>=x:
    l = x*2 / suf2
    x = b/l
    ans = math.degrees(math.atan(x))
else:
    l = (vol-x)*2 / (a*a)
    x = l/a
    ans = math.degrees(math.atan(x))
    
print(round(ans,6))

Submission status: Runtime Error

Solution code:
A = int(input())

B = int(input())

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

Submission status: Runtime Error

Solution code:
A = int(input())

B = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
ab = input()
a, b = ab.split(" ")
A = int(a)
B = int(b)

if "0" in a or "0" in b or a > 9 or b > 9:
    print(-1)
else:
    print(A * B)

Submission status: Runtime Error

Solution code:
ab = inpout()
a, b = ab.split("")
A = int(a)
B = int(b)

if "0" in a or "0" in b:
	print(-1)
else:
	print(A * B)

Submission status: Runtime Error

Solution code:
ab = inpout()
a, b = ab.split("")
A = int(a)
B = int(b)

if "0" in a or "0" in b:
	print(-1)
else
	print(A * B)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 12 15:32:21 2019

@author: fujimotokohsei
"""

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

n=a*b

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 12 15:32:21 2019

@author: fujimotokohsei
"""

a=int(input('数字を入力してくだい:'))
b=int(input('数字を入力してくだい:'))

n=a*b

if n/100>1:
    print(-1)
else:
    print(n)

Submission status: Runtime Error

Solution code:
a=int(input('数字を入力してくだい:'))
b=int(input('数字を入力してくだい:'))

n=a*b

if n/10>100:
    print(-1)
else:
    print(n)

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(10):
    for j in range(10):
        if N == i*j:
            print('Yes')
        if i*j == 81 and N!=81:
            print('No')
        if N == i*j:
            break
    if N== i*j:
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
f = 0
for i in range(1, 9):
    for j in range(1, 9):
        if i*j == n:
            f = 1
if f == 0:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
A = int(input('A='))
B = int(input('B='))
if A > 9 or B > 9:
  print('-1')
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=eval(input('A=:'))
B=eval(input('B=:'))
if A > 9 or B > 9:
  print('-1')
else:
  print(A*B)

Submission status: Runtime Error

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

def xx(y):
  aHeight = a*math.sin(y)
  bHeight = b*math.sin(0.5*math.pi-y)
  if aHeight < bHeight:
    menseki = 0.5*a*b + (bHeight/aHeight*a-b)*math.sin(0.5*math.pi-y)*(a/math.cos(y))
  else:
    aD = bHeight/math.sin(y)
    menseki = 0.5*aD*b
  return menseki

minY = 0
maxY = 0.5*math.pi
while True:
  menseki = xx((minY+maxY)/2)
  if abs(x/a - menseki) < 0.1:
    print((minY+maxY)/2 * (180/math.pi))
    break
  elif menseki < x/a:
    maxY = (minY+maxY)/2
  else:
    minY = (minY+maxY)/2

Submission status: Runtime Error

Solution code:
import math
N = int(input())
sqN = int(math.sqrt(N))
for i in range(sqN):
  if N % (sqN-i) == 0:
    print(int(N/(sqN-i)+sqN-i))
    break

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if ai < 10 and bi < 10:
  print(ai * bi)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
import sys
 
a = sys.argv
i1 = int(a[1])
i2 = int(a[2])
if i1 < 10 and i2 < 10:
  print(i1 * i2)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
import sys
 
def main():
  a = sys.argv
  i1 = int(a[1])
  i2 = int(a[2])

  if i1 < 10 and i2 < 10:
    return i1 * i2
  else:
    return -1

main()

Submission status: Runtime Error

Solution code:
import sys

a = sys.argv
i1 = int(a[1])
i2 = int(a[2])

if i1 < 10 and i2 < 10:
  return i1 * i2
else:
  return -1

Submission status: Runtime Error

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

int main()
{
    int A, B;
    cin >> A >> B;

    if (A <= 9 and B <= 9)
    {
        cout << A*B << endl;
    }
    else
    {
        cout << -1 << endl;
    }

    return 0;
}

Submission status: Runtime Error

Solution code:
a = int(input())

for i in range(int(a**0.5),0,-1):
    if a % i == 0:
        print(int(a/i + i -2))
        break

Submission status: Runtime Error

Solution code:
a = int(input())

for i in range(int(i**0.5),0,-1):
    if a % i == 0:
        print(int(a/i + i -2))
        break

Submission status: Runtime Error

Solution code:
a = int(input())

for i in range(int(i**0.5),0,-1):
    if a % i == 0:
        print(a/i + i -2)
        break

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

a = int(input())

b = prime_factorize(a)

c = 10**10
d = 10**10
for i in range(len(b)):
    if i % 2 == 0:
        c *= b[i]
    else:
        d *= b[i]

print(c + d - 2)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
#10に着目するか？
a = max(N/1,N/2,N/3,N/4,N/5,N/6,N/7,N/8,N/9)
if a // 1 == a and a < 10:
    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(a*b)
else:
  print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def cul(A, B):
    if A < 10and B<10:
      print(A*B)
    elif A>10orB>10:
      print(-1_

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
import sys
sys.setrecursionlimit(10000)
def culc(s,x,m,F_array,eat_time):
   
    K_sum = eat_time/F_array
    must_del = K_sum[K_sum > x]
    must_del = must_del - x
    sum_del = int(np.sum(must_del))
    print(x)
    print(sum_del)
    if sum_del == x:
        return x

    if sum_del > x:
        s = x
        x = int((x+m)/2)
        return culc(s,x,m,F_array,eat_time)
    else:
        m = x
        x = int((x+s)/2)
        return culc(s,x,m,F_array,eat_time)


import numpy as np
N,K = map(int,input().split())
A_list =  list(map(int, input().split()))
F_list =  list(map(int, input().split()))
s = 0
m = 1.0e+18
x = 5.0e+17
eat_time = []
A_list.sort() #min max
F_list.sort(reverse=True) #max -min

A_array = np.array(A_list)
F_array = np.array(F_list)
eat_time =A_array*F_array

print(culc(s,x,m,F_array,eat_time))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
x = random.randint(1, 20)
y = random.randint(1, 20)

if x<=9 and y<=9:
  print(x*y)
else:
  print(-1)

Submission status: Runtime Error

Solution code:

x = random(x, y)

if x<=9 and y<=9:
  print(x*y)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
input(int(x, y))

if x or y > 10:
  print(-1)
else:
  print (x * y)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
f, s = input().split()
if f>9 and s>9:
  print(-1)
else:
  print(f*s)

Submission status: Runtime Error

Solution code:
s = input()
if len(s)>3:
  print(-1)
else:
  print(eval(s.replce(" ", "*")))

Submission status: Runtime Error

Solution code:
N = int(input())
flag = 0

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

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

Submission status: Runtime Error

Solution code:
x = input()
x = int(x)
y = input()
y = int(y)

if x < 10 and y < 10:
	print(x * y)
else:
	print(-1)

Submission status: Runtime Error

Solution code:

A,B = (int(x) for x in input().split())
if A >=10 or B >:
	print(-1)
else:
    print(A*B)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = "No"

for i in range(1, 10):
    if N % i == 0:
        t =  N / i
        if 1 <= t <= 9:
            ans = "Yes"
            break

print(ans)

Submission status: Runtime Error

Solution code:
a=int(input())

b=int(input())

if(0<=a<=9 & 0<=b<=9):
    print(a*b)

else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a, b = input()

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

Submission status: Runtime Error

Solution code:
a,b = random.randint(1, 20)
if a+b <= 18:
  print(a*b)
  else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B = (int(i) for i in input().split())  
if len(A)>1 | len(B)>1:
  print("-1")
else:
  print(A*B)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A=[i*j for i in range(1,10) for j in range(1,10)]
B=int(input())
if B in A:
    print("Yes")
elif B not in A:
    print("No")

Submission status: Runtime Error

Solution code:
x = int(input())
flag = 0
if x < 10:
    print("Yes")
for l in range(1,10,1):
    num =x/l
    mod = x % l
    if num < 10 and mod == 0:
        flag =1
        break
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
1<=A<=20
1<=B<=20
A,B=map(int,input().split()) 
if A>=10 or B>=10 or A<=0 or B<=0:
    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:
a, b = [int(i) for i in input().split()]

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

Submission status: 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("a"))
B=int(input("b"))

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
A=(1,2,3,4,5,6,7,8,9)
B=(1,2,3,4,5,6,7,8,9)
count=0
for c in A:
  for d in B:
    e=c*d
    if N/e == 1 and N%e==0:
      count=count+1
if count >= 1 :
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
A=(1,2,3,4,5,6,7,8,9)
B=(1,2,3,4,5,6,7,8,9)
count=0
for a in A:
  for b in B:
    c=a*b
    if N/c == 1 and N%c==0:
      count=count+1
if count >= 1 :
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
A=(1,2,3,4,5,6,7,8,9)
B=(1,2,3,4,5,6,7,8,9)
count=0
for a in A:
  for b in B:
    if N/(a*b) == 1 and N%(a*b)==0:
      count=count+1
if count >= 1 :
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
A=(1,2,3,4,5,6,7,8,9)
B=(1,2,3,4,5,6,7,8,9)
count=0
for a in A:
  for b in B:
    if N/(a*b) == 1 and N%(a*b)==0:
      count=count+1
if count>=1:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
A=(1,2,3,4,5,6,7,8,9)
B=(1,2,3,4,5,6,7,8,9)
count=0
for a in A:
  for b in B:
    if N/(a*b) == 1 and N%(a*b)==0:
      count=count+1
print(count)
if count>=1:
  print('Yes')
else:
  print('No')

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
data=input().split()
ans=1
count=0

for i in data:
  if int(i)<=9:
    ans*=int(i)
  if int(i)>9:
    count+=1
    
if count>=1:
  print("-1")
elif cuont==0:
  print(ans)

Submission status: Runtime Error

Solution code:
string=input

string=string.split(' ')
A= int(A[0])
B= int(A[1])

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

Submission status: Runtime Error

Solution code:
string=input

string=string.split(' ')
A= int(A[0])
B= int(A[1])

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

Submission status: Runtime Error

Solution code:
string=input

string=string.split(' ')
A= int(A[0])
B= int(A[1])

if A in range(1,10):
else:
    print(-1) break
if B in range(1,10):
else:
    print(-1) break
print(A*B)

Submission status: Runtime Error

Solution code:
string=input

string=string.split(' ')
A= int(A[0])
B= int(A[1])

if A in range(1,10):
else:
    print(-1) break
if B in range(1,10):
else:
    print(-1 break)
print(A*B)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Nov  6 21:49:38 2019

@author: over-
"""

N=int(input())

ans=N
for i in range(1,10**12):
    if i > N: break
    if N%i == 0:
        A=(N/i-1)+(i-1)
        if A < ans:
            ans = A
            
print(int(A))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

A=int(input())
B=int(input())

bool1 =False

if A*B>81:
    bool1=False
elif A*B<=81:
    for j in range(1,10):
        if A*B%j==0:
            if A*B/j<=9:
                bool1=True
                break

if bool1==True:
     print(A*B)
else:
    print(-1)

Submission status: Runtime Error

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

bool1 =False
number=-1

if A*B>81:
    bool1=False
elif A*B<=81:
    for j in range(1,10):
        if A*B%j==0:
            if A*B/j<=9:
                bool1=True
                break

if bool1==True:
     print(A*B)
else:
    print(-1)

Submission status: Runtime Error

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

A=int(input())
B=int(input())

bool1 =False
number=-1

if A*B>81:
    bool1=False
elif A*B<=81:
    for j in range(1,10):
        if A*B%j==0:
            if A*B/j<=9:
                bool1=True
                break

if bool1==True:
     print(A*B)
else:
    print(-1)

Submission status: Runtime Error

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

A=int(input())
B=int(input())

bool1 =False
number=-1

if A*B>81:
    bool1=False
elif A*B<=81:
    for j in range(1,10):
        if A*B%j==0:
            if A*B/j<=9:
                bool1=True
                break

if bool1==True:
    print(A*B)
if bool1==False:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Solution code:
a=int(input())
b=0
c=0
for i in range(1,10):
  if a%i==0:
    b=a/i
    if b<=9:
      c=1
      break
if c==1:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a=int(input())
b=0
c=0
for i in range(1,10):
  if a%i==0:
    b=a/i
    if b<=9:
      c=1
      break
if c==1:
  print("Yes")
else
  print("No")

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
aaa,baa=map(int, input().split()) 
caa=aaa*baa
if baa=<9 or aaa=<9:
  print(caa)
else:
  print('-1')

Submission status: Runtime Error

Solution code:
aaa,baa=map(int, input().split()) 
caa=aaa*baa
if baa=<9 or aaa=<9:
  print('-1')
else:
  print(caa)

Submission status: Runtime Error

Solution code:
aaa,baa=int(input())
caa=aaa*baa
if baa>10 or aaa>10:
  print('-1')
else:
  print(caa)

Submission status: Runtime Error

Solution code:
aaa=int(input())
baa=int(input())
caa=aaa*baa
if baa>10 or aaa>10:
  print('-1')
else:
  print(caa)

Submission status: Runtime Error

Solution code:
# coding: utf-8

a, b = map(int, input().split())
if not 0 <= a <= 9 or not 0 <= b <= 9:
  print("-1")
  sys.exit()
  
c = a * b
print(c)

Submission status: Runtime Error

Solution code:
A=input()
B=input()
print(A*B)

Submission status: Runtime Error

Solution code:
def main():

if __name__ == "__main__":
    main()
int A B
If(A<10,B<10):
  A*B=C
  print(C)
else:
  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:
N, K = map(int, input().split())
A = list(map(int, input().split()))
F = list(map(int, input().split()))
A.sort()
F.sort(reverse=True)

l = 0
r = max(a * f for a, f in zip(A, F)) + 1

while l < r:
    m = (l + r) // 2
    if sum(max(a - m // f, 0) for a, f in zip(A, F)) <= K:
        r = m
    else:
        l = m + 1

print(r)

Submission status: Runtime Error

Solution code:
a = input()
b = 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:
#coding:utf-8
a, b = map(int, input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

N=int(input())
for i in range(1,10):
  if N/i==N//i and N/i<10:
    print("Yes")
    sys.exit()
  else:
    print("No")