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())
ans = 'No'
for i in range(1,10):
    for j in range(1,10):
        if n == i*j:
            ans = 'Yes'
            break
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,M,A,B=map(int,input().split())
for m in range(M):
    if N<=A:
        N+=B
    c=int(input())
    N-=c
    if N<0:
        print(m+1)
        break
else:
    print("complete")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

if len(a)>=2 or len(b)>=2:
  print("-1")
else:
  print(a*b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
for i in range(1,10):
  if (N/i).is_integer==True and (N/i)<10:
      print("Yes")
print("No")

Submission status: Runtime Error

Solution code:
import math
a=int(input())
list=[]
for i in range(1,int(math.sqrt(a))+1):
  if a%i == 0:   
    list.append(int(i+a/i-2))
print(min(list))

Submission status: Runtime Error

Solution code:
list=[]
 for i in range(1,10):
    for j in range(1,10):
      list.append(i*j)
a=int(input())
if a in list:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
list=[]
 for i in range(1,10):
    for j in range(1,10):
      list.append(i*j)
a=input()
if a in list:
  print('Yes')
else:
  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:
import math
a=int(input())
list=[]
for i in range(1,int(math.sqrt(a))+1):
  if a%i==0:
    list.append(i+int(a/i)-2)
b=min(list)
print(b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
if x < 10 || y < 10:
  print("x*y")
else:
  print("-1")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import math
N=int(input())
x=[]
min=10000000000000000
ans=0
sqN=math.ceil(math.sqrt(N))
for i in range(1,sqN+1):
  if N%i==0:
    j=int(N/i)
    a=[i,j]
    x.append(a)
for i,j in x:
  if i+j<=min:
    ans=i+j-2
    min=i+j
print(ans)
print(x)

Submission status: Runtime Error

Solution code:
<?php
$input = explode(' ', fgets(STDIN));
$A = $input[0];
$B = $input[1];

if (($A<10)and($B<10)){
    print $A*$B;
}else {
    print -1;
}
?>

Submission status: Runtime Error

Solution code:
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include <bits/stdc++.h>
using namespace std;
int main(){
    int a,b;
    cin >> a >> b;
    if (1 <= a && a <= 9 && 1 <= b && b <= 9) cout << a*b << endl;
    else cout << -1 << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
print(a*a)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
N = int(input())

List = []
for i in range(1,10**4):
    for j in range(1,10**4):
        if N == i*j:
            List.append(i+j)

print(min(List)-2)

Submission status: Runtime Error

Solution code:
import math
N = int(input())
min = 9999999999999
end = int(math.ceil(math.sqrt(N)))
for i in range(1, end):
  if N % i == 0:
    x = (N//i)+i-2
    mini = x if x < min else min
print(mini)

Submission status: Runtime Error

Solution code:
import math
N = int(input())
min = 9999999999999
for i in range(1, int(math.ceil(math.sqrt(N))) ):
  if N % i == 0:
    x = (N//i)+i-2
    min = x if x < min else min
print(min)

Submission status: Runtime Error

Solution code:
N = int(input())
if(N in [1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,21,24,25,27,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 in [1, 2, 3, 4, 5, 6, 7 ,8 ,9,10, 12, 14, 15, 16, 18, 20, 21 ,24, 25, 27, 30, 32, 35, 36, 40,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 in [1, 2, 3, 4, 5, 6, 7 ,8 ,9,10, 12, 14, 15, 16, 18, 20, 21 ,24, 25, 27, 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 in [1, 2, 3, 4, 5, 6, 7 ,8 ,9, 10, 12, 14, 15, 16, 18, 20, 21 ,24, 25, 27, 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 in [1, 2, 3, 4, 5, 6, 7 ,8 ,9, 10, 12, 14, 15, 16, 18, 20, 21 ,24, 25, 27, 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:
a,b=int(input())
if a<10 and b<10:
  print(a*b)
else:
  print('No')

Submission status: Runtime Error

Solution code:
A,B = list(map(int,inpput().split()))
if A > 9 or B > 9:
  print('-1')
  exit()
print(A*B)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
ans = {i*j for i in range(1,10) for j in range(1,10)}
if n in ans:
  print("Yes")
else:print("No")

Submission status: Runtime Error

Solution code:
q,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: Runtime Error

Solution code:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

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


if n > 81:
    print('No')
    exit()

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

print('No')

Submission status: Runtime Error

Solution code:
judge = False
N = int(input())
for i in range(9):
    for j in range(9):
        #print((i+1) * (j+1))
        if (i+1) * (j+1) == N:
            judge = True

if judge == True:
    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 = 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:
import math
import sys

n = int(input())

l = []
if n == 2:
    print(1)
    sys.exit()
else:
    for i in range(2, int(math.sqrt(n) + 1)):
        if n % i == 0:
            for i in range(1, int(math.sqrt(n)) + 1):
                if n % i == 0:
                    j = n // i
                    l.append(i + j)
            print(min(l) - 2)
            sys.exit()
print(n -1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input())
if a >= 10 or b >= 10:
    print(int(a * b))

else:
    print(-1)

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

else:
    print(-1)

Submission status: Runtime Error

Solution code:
r = int(input())

print(r ** 2)

Submission status: Runtime Error

Solution code:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.readline().rstrip())

    ret = float('inf')
    for i in range(1, 10000000):
        q, mod = divmod(N, i)
        if mod == 0:
            j = N // i
            ret = min(ret, ((j-1)+(i-1)))

    print(ret)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N =int(input())

if N !=0 and N <10:
  print("Yes")
  exit()

for i in [2,10]:
  if N % i ==0:
    print("Yes")


    
print("No")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
def main():
    A,B = int(input())
    if 1=< A < 10 and 1<= B < 10:
        print(A*B)
    else:
        print('-1')

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys
n = int(input())
for i in range(int(n**0.5), 0, -1):
    if n%i==0:
        j=n//i
        print(i+j-2)
        sys.exit()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
check = []
for i in range(1,9):
  for j in range(1,9):
    check.append(i * j)
if N in check:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
check = []
for i in range(1,9):
  for j in range(1,9):
    check.append(i * j)
if N in check:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
package main
import {
  "fmt"
  "os"
  "bufio"
  "strconv"
  "strings"
}

func main() {
  stdin := bufio.NewScanner(os.Stdin)
  stdin.Scan()
  text := stdin.Text()
  s := strings.Split(text, " ")
  if s[0] > 9 or s[1] > 9 {
    print(-1)
  } else {
    print(s[0] * s[1])
  }
}

Submission status: Runtime Error

Solution code:
num1 = int(input())
num2 = int(input())

if num1 >= 10 or num2 >= 10 :
    print(-1)
else:
    print(num1 * num2 )

Submission status: Runtime Error

Solution code:
N = int(input())
M = [x*y for y in range(1,10) for x in range(1,10)]

if N in M:
    print('Yes')     
else:
    print('No')

Submission status: Runtime Error

Solution code:
n=int(input())
a=[]
for i in range(1,10):
    for j in range(1,i+1):
        a.append(i*j)
if n in a:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
f = 1
for i in range(1, int(n**.5)+1):
    if n % i == 0:
        f = i
print(f-1+n//f-1)

Submission status: Runtime Error

Solution code:
A = Input()
B = 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 1<=a<=9 and 1<=b<=9:
  return a*b
else:
  return -1

Submission status: Runtime Error

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

Solution code:
def LI():
  return [int(s) for s in input.split()]

A,B = LI()

print(A*B)

Submission status: Runtime Error

Solution code:
from sys import stdin
A, B = map(int, stdin.redline.rstrip().split())

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

Submission status: Runtime Error

Solution code:
from sys import stdin
A, B = map(int, stdin.redline.rstrip().split())

if A<10 and A>0 and 0<b and b<10:
    return A*B
else:
    return -1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if n <= 9 and m <- 9:
  print(n * m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;

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

Submission status: Runtime Error

Solution code:
A=input()
B=input()
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:
n = gets.to_i
a = Math.sqrt(n).to_i

while n % a != 0
  a -= 1
end

b = n / a
puts a + b - 2

Submission status: Runtime Error

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 or k < 10:
		print(int(n*k))	
 	else:
 		print(-1)

 
if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())
h = x/(a**2)
if b//2 >= h:

    d = 2*h*a/b

    sin = math.degrees(math.acos(d/((d**2+b**2)**0.5)))
    print(sin)
else:
    d = 2*(b-h)*a/a
    sin = math.degrees(math.acos(d/((d**2+a**2)**0.5)))
    print(90-sin)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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:
N = int(input())
for i in range(9):
  for j in range(9):
    if (i+1)*(j+1)==N:
      print("yes")
      exit()
print("No")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int solve()
{
    int a, b;
    string str;
    cin >> a >> b;
    if (a > 9 || b > 9)
        return -1;
    return a * b;
}
int main()
{
    cout << solve() << endl;
}

Submission status: Runtime Error

Solution code:
import sys
N = int(input())

for a in range(1, 10):
    for b in range(1, 10):
        if a * b == N:
            print("Yes")
            sys.exit(0)

print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

valid = range(1, 10)
if a in valid and b in valid:
  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:
    num = a*b
print(num)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
bool1=False
#print(a,"to",b) a=21 b=1 i=3 j=7 out
if 1<=a and a<=20 and 1<=b and b<=20:
	for i+1 in range(10):
		for j+1 in range(10):
			#print(i)
			if i*j == a*b:
				#print("a")
				bool1=True
				#print(bool1)
				break
			else:
				#print("j={0}".format(j))
				pass
		if bool1==True:
			break
#print(bool1)
if bool1==True:
	print(a*b)
else:
	print(-1)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
bool1=False
#print(a,"to",b) a=21 b=1 i=3 j=7 out
if 1<=a and a<=20 and 1<=b and b<=20
for i in range(10):
	for j in range(10):
		#print(i)
		if i*j == a*b:
			#print("a")
			bool1=True
			#print(bool1)
			break
		else:
			#print("j={0}".format(j))
			pass
	if bool1==True:
		break
#print(bool1)
if bool1==True:
	print(a*b)
else:
	print(-1)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
A, B = map( int, inpuot().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(stdin.readline().rstrip().split())

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

Submission status: Runtime Error

Solution code:
import sys

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

if a>0 and 10>a and b>0 and 10>b:
    print(a*b)

else:
    print(-1)

Submission status: Runtime Error

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

C=A*B

if C>81:
	print(-1)
elif C<1:
	print(-1)
else:
	print(C)

Submission status: Runtime Error

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

C=A*B

if C>81:
	print("-1")
elif C<1:
	print("-1")
else:
	print(C)

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:
n = int(input())
for i in range(1, 10)
    for j in range(1, 10)
		if n == i * j:
			print("Yes")
			break
 
print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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


l = x/(a*a)

if l<=b/2.0:
    f = b**2.0/(2.0*a*l)
else:
    f = 2.0*(b-l)/a
ans = math.degrees(math.atan(f))
print(ans)

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

Submission status: Runtime Error

Solution code:
import math
A = int(input())
B = int(math.sqrt(A))
count = 0
for i in reversed(range(1,B+1)):
	if count == 0:
		if A % i == 0:
			print(int(i+A/i-2))
			count += 1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a = input().strip()
b = input().strip()

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

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:
N=int(input())
ans="No"
for i in range(1,10):
    for j in range(1,10):
        if i*j==N:
            ans="Yes"
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
# Calculate amount of water that won't oveflow
def calc(a,b,deg): 
    
    rad = math.radians(deg)
    # deg90_in_rad = math.radians(90)
    # a_sect = a*math.sin(rad) - b*math.sin(deg90_in_rad - rad)
    # b_sect = b*math.sin(deg90_in_rad - rad) - a*math.sin(rad) # 縦と水の切片

    # if b_sect >= 0:
    #     sqr_a = a * b_sect 
    #     tri_a = (b-b_sect)*a*1/2  

    # else:
    #     sqr_a = 0
    #     tri_a = (a - a_sect) * b *1/2
    # total_area = (sqr_a + tri_a) 

    if b*math.tan(math.pi/2-rad) <= a:
        total_area = (b*math.tan(math.pi/2-rad)*b*1/2)
    if b*math.tan(math.pi/2-rad)>a:
        total_area = (a*b - a*math.tan(rad)*a*1/2)       

    return total_area * a

import bisect
def main():
    a, b, x = list(map(int, input().split()))

    left = 0
    right = 90
    deg = 45
    while True:
        y = calc(a, b, deg)
        if y - x >= -10 ** -7 and y - x <= 0:
            break
        if y > x:
            deg, left = (right+deg)/2, deg
        elif y < x:
            deg, right = (left+deg)/2, deg
    print(deg)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:

import math
# Calculate amount of water that won't oveflow
def calc(a,b,deg): 
    
    rad = math.radians(deg)
    deg90_in_rad = math.radians(90)
    a_sect = a*math.sin(rad) - b*math.sin(deg90_in_rad - rad)
    b_sect = b*math.sin(deg90_in_rad - rad) - a*math.sin(rad) # 縦と水の切片

    if b_sect >= 0:
        sqr_a = a * b_sect 
        tri_a = (b-b_sect)*a*1/2  

    else:
        sqr_a = 0
        tri_a = (a - a_sect) * b *1/2

    # if b*math.tan(math.pi/2-rad)>a:
    #     return (a*b - a*math.tan(rad)*a*1/2) *a
    # else:
    #     return (b*math.tan(rad/2-rad)*b*1/2)*a
    # print(a_sect, b_sect)
    return (sqr_a + tri_a) * a

import bisect
def main():
    a, b, x = list(map(int, input().split()))

    left = 0
    right = 90
    deg = 45
    while True:
        y = calc(a, b, deg)
        if y - x <= 0 and y - x >= -10 ** -7 :
            break
        if y > x:
            deg, left = (right+deg)/2, deg
        elif y < x:
            deg, right = (left+deg)/2, deg
        
    print(deg)

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
################################################
# Start Below

# imports
    
def factors(n):
    gaps = [1,2,2,4,2,4,2,4,6,2,6]
    length, cycle = 11, 3
    f, fs, nxt = 2, [], 0
    while f * f <= n:
        while n % f == 0:
            fs.append(f)
            n /= f
        f += gaps[nxt]
        nxt += 1
        if nxt == length:
            nxt = cycle
    if n > 1: fs.append(n)
    return fs

import itertools
from itertools import combinations, chain
import copy 

# def powerset(L):
#   pset = set()
#   for n in range(len(L) + 1):
#     for sset in itertools.combinations(L, n):
#       pset.add(sset)
#   return pset
def powerset(iterable):
    "powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)"
    s = list(iterable)
    return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
    
def list_diff(first, second):
        first = copy.copy(first)
        for s in second:
            first.remove(s)
        return first

def prod(lst):
    ret = 1
    for a in lst:
        ret *= a
    return ret

def sup(x):
    return [sorted(x[:i]+x[i+s:]) for i in range(len(x)) for s in range(len(x))]

def main():
    N = int(input())
    facs = factors(N) 
    # st = powerset(facs)
    st=sup(facs)
    # print(facs, st)

    mn_ij = 10**12
    for i in st+[[]]:
        i = prod(i)
        # j = list_diff(facs, i)
        # i, j = prod(i), prod(j)
        j = N / i
        # print(i,j)
        mn_ij = min(mn_ij, i+j)

    # print(list(map(len,[ st, facs]) ))
    print(int(mn_ij-2))

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
n=int(input())
if(n>81):
    print("No")
else:
    c2=0
    c3=0
    c5=0
    c7=0
    while(n%2==0):
        c2+=1
        n=n/2
    while(n%3==0):
        c3+=1
        n=n/3
    while(n%5==0):
        c5+=1
        n=n/5
    while(n%7==0):
        c7+=1
        n=n/7
    if(n!=1):
        print("No")
    else:
        if(c5==2 and c2==0 and c3==0 and c7==0):
            print("Yes")
        elif(c5==1 and c7==1 and c2==1):
            print("No")
        elif(c5<2):
            print("Yes")
        else:
            print("No")

Submission status: Runtime Error

Solution code:
n=int(input())
if(n>81):
    print("No")
else:
    c2=0
    c3=0
    c5=0
    c7=0
    while(n%2==0):
        c2+=1
        n=n/2
    while(n%3==0):
        c3+=1
        n=n/3
    while(n%5==0):
        c5+=1
        n=n/5
    while(n%7==0):
        c7+=1
        n=n/7
    if(n!=1):
        print("No")
    else:
        if(c5==2 and c2==0 and c3==0 and c7==0):
            print("Yes")
        elif(c5<2):
            print("Yes")
        else:
            print("No")