Problem:


Score : 200 points

Problem Statement

Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.

Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print Yes; if it cannot, print No.

Constraints

1 \leq N \leq 100

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

If N can be represented as the product of two integers between 1 and 9 (inclusive), print Yes; if it cannot, print No.

Sample Input 1

10

Sample Output 1

Yes

10 can be represented as, for example, 2 \times 5.

Sample Input 2

50

Sample Output 2

No

50 cannot be represented as the product of two integers between 1 and 9.

Sample Input 3

81

Sample Output 3

Yes



Sample input:
10


Sample output:
Yes

Submission status: Runtime Error

Solution code:
n = int(input().split())
flag = False
for i in range(1, 10):
	for j in range(1, 10):
		if i*j == n:
        flag = True
if flag is True:
    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:
      print(Yes)
      exit()
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:
      print(Yes)
      return;
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:
      print(Yes)
      return 0;
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:
      print(Yes)
      return
print(No)

Submission status: Runtime Error

Solution code:
N = input()
dict = {}

for i in range(1: 10):
    for j in range(i+1: 10):
        dict[i*j] = True

return dict.get(N)

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:
            s="Yes"
print(s)

Submission status: Runtime Error

Solution code:
import math
a = int(input())
flag = False
i = 0

while i <= math.sqrt(a):
  b = divmod(a)
  if b[0] < 10 and b[1] == 0:
    flag = True
  else:
    i+=1
    
if flag:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
xlist=[]
for a in range(10):
    for b in range(10):
        xlist.append(a*b)

if n in xlist:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n=int(input())#入力

for a in range(10):
    for b in range(10):
        if a*b==n:
            print("Yes")
            break #Yesになった時にループを終了
    if a*b==81:
    print("No")#break(if文条件)が一度も起きなかった時のみ出力

Submission status: Runtime Error

Solution code:
a=int(input())

def insu(n):
  arr=[]
  for i in range(2,10):
    if n%i=0:
      while n%i=0:
        n=n/i
        arr.appned(i)
  return arr

if all(insu(a))<10:  
  ans="Yes"
else:
  ans="No"
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

ln = []

for i in range(1:10):
  for j in range(1:10):
    ln.append(i*j)
    
print("Yes" if n in ln else "No")

Submission status: Runtime Error

Solution code:
a=int(input())

def factorization(n):
  arr=[]
  for i in range(2,10):
    if n%i==0:
      while temp%i==0:
        n=n/i
      	arr.append(i)
      return arr

print(all(arr)<10)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
N2=N3=N5= N7 = 0
if N > 81:
    print("No")
    quit()
else N < 10:
    print("Yes")
    quit()
while N % 2 == 0:
    N = N / 2
    N2 += 1
while N % 3 == 0:
    N = N / 3
    N3 += 1
while N % 5 == 0:
    N = N / 5
    N5 += 1
while N % 7 == 0:
    N = N / 7
    N7 += 1
if N2>6 or N3>4 or N5>1 or N7>1:
    print("No")
elif (2**N2) * (3**N3) * (5**N5) * (7**N7) > 81:
    print("No")
elif N2==N3==N5==N7==0:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
n = int(input())

flag = 0
for i in range(1, 10):
    m = n/i
    try:
        m = int(m)
        if m < 10:
          flag = 1
            print("Yes")
            break
    except:
        continue
if flag ==0:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
_output = False
for n in range(1,10):
  if N % n == 0:
    tmp = N/n
  	if tmp <= 9:
      print("Yes")
      _output = True
      break
if not _output:
  print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
for a in range(0,10):
  if N%a==0 and N/a<=9:
    print("Yes")
    break
  else:
    if a>=10:
      print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=input()
if N<11 or N==12 or 11<N<17 or N==18 or 19<N<22 or 23<N<26 or N==27 or N==30
or N==32 or 34<N<37 or N==40 or N==42 or N==45 or N==48 or N==49 or N==54 or N==63 or N==72 or N==81 or N==64 or N==56:
	print('Yes')
else:
	print('No')

Submission status: Runtime Error

Solution code:
A = int(input())
c = 0
for i in range(1,10):
  if (A % i == 0 and A // i < 10):
    c += 1
if c > 0:
  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]
C = []
D = 0
if 1 < N < 100:
  for i in range(9):
    C.append(A[i]*B[i])
  D =  int(N in C)
if D = 1:
    print('Yes')
elif D = 0:
    print('No')
else:
    print('ばぐ')

Submission status: Runtime Error

Solution code:
N = int(input())
if 1 < N < 100:
  A = [1,2,3,4,5,6,7,8,9]
  B = [1,2,3,4,5,6,7,8,9]
  C = []
  D = 0
  for i in range(9):
    C.append(A[i]*B[i])
  D =  int(N in C)
  if D = 1:
    print('Yes')
  elif D = 0:
    print('No')
  else:
    print('ばぐ')
else：

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
list = [str(x*y) for x in range(1,10) for y in range(1,10)]
result = str(N) in list

if reuslt == "True":
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
if 1 < N < 100:
  A = [1,2,3,4,5,6,7,8,9]
  B = [1,2,3,4,5,6,7,8,9]
  C = []
  D = 0
  for i in range(9):
    C.append(a[i]*b[i])
  D =  int(N in C)
  if D = 1:
    print('Yes')
  elif D = 1:
    print('No')
  else:
    print('ばぐ')
else：

Submission status: Runtime Error

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


b=a/2
c=a/3
d=a/4
e=a/5
f=a/6
g=a/7
h=a/8
i=a/9

if b==1 or b==2 or b==3 or b==4 or b==5 or b==6 or b==7 or b==8 or b==9 or c==1 or c==2 or c==3 or c==4 or c==5 or c==6 or c==7 or c==8 or c==9 or
d==1 or d==2 or d==3 or d==4 or d==5 or d==6 or d==7 or d==8 or d==9 or e==1 or e==2 or e==3 or e==4 or e==5 or e==6 or e==7 or e==8 or e==9 or f==1 or f==2 or f==3 or f==4 or f==5 or f==6 or f==7 or f==8 or f==9 or g==1 or g==2 or g==3 or g==4 or g==5 or g==6 or g==7 or g==8 or g==9 
or h==1 or h==2 or h==3 or h==4 or h==5 or h==6 or h==7 or h==8 or h==9 or i==1 or i==2 or i==3 or i==4 or i==5 or i==6 or i==7 or i==8 or i==9:
    print("yes")
else:
    print("no")

Submission status: Runtime Error

Solution code:
n = int(input())
c=9
d = []
while True:
    if n>81:
        pint('No')
        break
    if n/c==int(n/c):
        n = n/c
        d.append(1)
        c = 9
    else:
        c -= 1
    if c<3:
        print('No')
        break
    if c==n:
        if len(d)==2:
            print('No')
        else:
            print('Yes')
        break

Submission status: Runtime Error

Solution code:
def productOfSingelDgt(n): 
    if n >= 0 and n <= 9: 
        return True
    prime = [ 2, 3, 5, 7 ]
    i = 0
    while i < SIZE and n > 1: 
        while n % prime[i] == 0: 
            n = n / prime[i] 
        i += 1
    return n == 1
  
n =int(input())
if(n>=1 and n<=100):
  if productOfSingelDgt(n): 
    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,10):
    a.append(i*j)
c=0
b = 0
for i in range(1,82):
  if a[i]==n:
    c=1
    print("Yes")
    break
  else:
    b = 1

if b==1 and c!=1:
  print("No")

Submission status: Runtime Error

Solution code:
def productOfSingelDgt(n): 
    if n >= 0 and n <= 9: 
        return True
    prime = [ 2, 3, 5, 7 ]
    i = 0
    while i < SIZE and n > 1: 
        while n % prime[i] == 0: 
            n = n / prime[i] 
        i += 1
    return n == 1
  
n =int(input())
if productOfSingelDgt(n): 
    print ("Yes") 
else : 
    print ("No")

Submission status: Runtime Error

Solution code:
n = int(input())

l = []
for i in range(n-1, 0, -1):
    if (n/i).is_integer() == True: 
        l.append(i)
        l.append(n/i)
        break
if l[0] < 10 and l[1] < 10:
    print('Yes')
else:
    print("No")

Submission status: Runtime Error

Solution code:
n = int(input())

cnt = 0
a = []
i = 9
flag = 'No'
while True:
    if n % i == 0:
        while n % i==0 and n != 1:
            n = n // i
            a.append(i)
    if n <= 1 or i <= 2 or len(a) >= 2:
        break
    i-=1

if len(a) == 1 and n == 1:
    len(a).append(1)

if len(a) == 2 and n == 1:
    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,10):
    a.append(i*j)

b = 0
for i in a:
  if a[i]==n:
    print("Yes")
    break
  else:
    b = 1
  
if b==1:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(input())

l = []
for i in range(n-1, 0, -1):
    if (n/i).is_integer() == True: 
        l.append(i)
        l.append(n/i)
        break
print(l)        
if l[0] < 10 and l[1] < 10:
    print('Yes')
else:
    print("No")

Submission status: Runtime Error

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


def solve(A):
    for i in range(1, 10):
        p = A / i
        q = A % i
        if q == 0 and p <= 9:
            print("Yes")
            return
    print("No")
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = next(tokens)
    solve(A)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0
for i in range(10):
    for j in range(i+1):
        if i*j == n:
            ans += 1
if ans == 1:
    print("Yes")
elif n == 2,4,16,25,36,49,64:
  print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def f(n):
	for i in range(1,10):
    	if n%i==0:
        	(n//i)<=9:
            	return "Yes"
	return "No"
n=int(input())
print(f(n))

Submission status: Runtime Error

Solution code:
n = int(input())

l = []
for i in range(n-1, 1, -1):
    if (n/i).is_integer() == True: 
        l.append(i)
        l.append(n/i)
        break
        
if l[0] < 10 and l[1] < 10:
    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,10):
    a.append(i*j)
    
for i in a:
  if a[i]==n:
    print("Yes")
    break
  else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

l = []
for i in range(n-1, 1, -1):
    if (n/i).is_integer() == True: 
        l.append(i)
        l.append(n/i)
        break
        
if l[0] < 10 and l[i] < 10:
    print('Yes')
else:
    print("No")

Submission status: Runtime Error

Solution code:
def f(n):
	for i in range(1,10):
    	if n%i==0 and (n//i)<=9:
        	return "Yes"
	return "No"
n=int(input())
print(f(n))

Submission status: Runtime Error

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


def solve(A: int):
    for i in range(1, 10):
        p = A / i
        q = A % i
        if q == 0 and p <= 9:
            print("Yes")
            return
    print("No")
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = next(tokens)
    solve(A)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:

    N = int(input())
    flag = 0
    
    for i  in range(9):
        atai = N / (i + 1) 
        for j in range(9):
            if atai == j + 1:
                flag = 1
                break
        if flag == 1:
            break
    if flag == 1:
        print("Yes")
    else:
        print("No")

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(1)
print('No')

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)
            
print(min(divisors[-1]+divisors[-2]-2,divisors[-3]+divisors[-4]-2))

Submission status: Runtime Error

Solution code:
num=int(input())
if num>81:
    return('No')
else:
    num_list=[]
    
    for a in range(1,10):
        for b in range(1,10):
            num_list.appned(a*b)
    num_list=set(num_list)
    if num in num_list:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
import sys
def is_integer(n):
    try:
        float(n)
    except ValueError:
        return False
    else:
        return float(n).is_integer()
a = input()
a = int(a)
if  a == 1:
 print("Yes")
 sys.exit()
k = range(1,a)
  for s in k:
   res = a/s
   #print("s",s)
   #print("res",res)
   try:
    res = int(res)
   except:
    break
   if is_integer(s):
    if is_integer(res):
     if len(str(s)) == 1:
      if len(str(res)) == 1:
       #print(res,s)
       if res * s == a:
        print("Yes")
        sys.exit() 
print("No")

Submission status: Runtime Error

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


def solve(A: int):
    for i in range(1, 10):
        p = A / i
        q = A % i
        if(q == 0 and p <= 9):
            print("Yes")
            return
    print("No")
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = next(tokens)
    solve(A)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys
def is_integer(n):
    try:
        float(n)
    except ValueError:
        return False
    else:
        return float(n).is_integer()
a = input()
a = int(a)
if  a == 1:
 print("Yes")
 sys.exit()
 else:
  k = range(1,a)
  for s in k:
   res = a/s
   #print("s",s)
   #print("res",res)
   try:
    res = int(res)
   except:
    break
   if is_integer(s):
    if is_integer(res):
     if len(str(s)) == 1:
      if len(str(res)) == 1:
       #print(res,s)
       if res * s == a:
        print("Yes")
        sys.exit() 
print("No")

Submission status: Runtime Error

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


def solve(A: int):
    
    for i in range(1, 10):
        p = A / i
        q = A % i
        if(q == 0 and p <= 9):
            print("Yes")
            return
    print("No")
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = next(tokens)  # type: str
    solve(A)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math

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

def main(divisors, o):
    for i in range(o):
        a = divisors[i]
        b = divisors[::-1][i]
        
        if a <= 9 and b <= 9:
            return 'Yes'
    return 'No'


divs = make_divisors(n)

o = len(divs)/2 + len(divs) % 2

print(main(divs, o))

Submission status: Runtime Error

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


def solve(A: int)
    
    for i in range(1, 10):
        p = A / i
        q = A % i
        if(q == 0 and p <= 9):
            print("Yes")
            return
    print("No")
    

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

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys
def is_integer(n):
    try:
        float(n)
    except ValueError:
        return False
    else:
        return float(n).is_integer()
if not a == 0:
 a = input()
 a = int(a)
 k = range(1,a)
 for s in k:
  res = a/s
  #print("s",s)
  #print("res",res)
  try:
   res = int(res)
  except:
   break
  if is_integer(s):
   if is_integer(res):
    if len(str(s)) == 1:
     if len(str(res)) == 1:
      #print(res,s)
      if res * s == a:
       print("Yes")
       sys.exit()
print("No")

Submission status: Runtime Error

Solution code:
import math


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

def main(divisors, o):
    for i in range(o):
        a = divisors[i]
        b = list(reversed(divisors))[i]
        
        if a <= 9 and b <= 9:
            return 'Yes'
    return 'No'


divs = make_divisors(n)

o = len(divs)/2 + len(divs) % 2

print(main(divs, o))

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(9):
    if N%(i+1) == 0:
        if N // (i+1) <= 9 :
            A = 1
            break
if A == 1:
    print("Yes")
else:            
    print("No")

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:
n = int(input())
bl = false
for i in 9
    for j in 9
        if n = i * j:
            bl = true
            break

if bl = true:
    print ("Yes")
else:
    print ("No")

Submission status: Runtime Error

Solution code:
def f(n):
  if n<=9
  	for i in range(1,10):
    	if n%i==0:
      	return 'Yes'
  else:
    for i in range(2,10):
    	if n%i==0:
      		return 'Yes'
    
  return 'NO'
n=int(input())
c=f(n)
print(c)

Submission status: Runtime Error

Solution code:
if n <= 81:
  for i in range(1, 10):
    if n%i == 0:
      for j in range(1, 10):
        if (n/i)%j == 0 and (n/i)/j == 1:
          print("Yes")
          exit()

print("No")

Submission status: Runtime Error

Solution code:
n = input()
bl = false
for i in 9
    for j in 9
        if n = i * j:
            bl = true
            break
if bl = true:
    print ("Yes")
else:
    print ("No")

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(9):
    if N%(i+1) == 0:
        if N // (i+1) <= 9 :
            A = 1000
            break
if A == 1000:
    print("Yes")
else:            
    print("No")

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

n = int(input())

tmp = prime_factorize(n)

if n = 1 or len(tmp) != 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = int(input())

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 = prime_factorize(n = N)

if len(a) > 2:
    b = a[0] * a[1]
    if b > 9:
        print('No')
    else:
        print('Yes')
else:
    if (a[0] > 9):
        print('No')
    else:
        print('Yes')

Submission status: Runtime Error

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

int main()
{
    int n,i,j;
    cin>>n;
    for(i=1;i<=9;i++)
    {
        for(j=1;j<=9;j++)
        {
            if(i*j==n)
            {
                cout<<"Yes";
            }
            
        }
    }
    cout<<"No";
    return 0;
}

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:
n = int(input())
for i in range(2,n):
    if (n % i) == 0 and i < 10 and n/i <10:
        res = 1
        break
    else:
        res = -1
if res == 1:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
N=int(input())
lsr=[]
for i in range(1,9):
    for j in range(1,9):
        lst.append(i*j)

print("Yes" if N in lst else "No")

Submission status: Runtime Error

Solution code:
n=int(input())
if n>=1 &&  n<=81:
  if n==50 || n==60 || n==70 || n==80:
    print('No')
  else:
    print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
ans = "No"
for i in range(N):
    if N % i == 0:
        if int(N / i) == N // i and len(str(N // i)) == 1:
            ans = "Yes"

print(ans)

Submission status: Runtime Error

Solution code:
import math


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

def main(divisors, o):
    for i in range(o):
        a = divisors[o]
        b = divisors[-o]
        if a < 9 and b < 9:
            return 'Yes'
    return 'No'


divs = make_divisors(n)
if len(divs) % 2 == 0:
    o = len(divs) / 2
else:
    o = int(math.ceil(len(divs) / 2))

print(main(divs, o))

Submission status: Runtime Error

Solution code:
a=int(input())
while x<10:
if a%x=0 and a//x<10:
	print('Yes')
    x += 1
else:
  print('No')

Submission status: Runtime Error

Solution code:
n = int(input())

if n%9 == 0:
    if n//9 <10:
        print(Yes)
    else:
        print(No)
elif n%8 == 0:
    if n//8 < 9:
        print(Yes)
    else:
        print(No)
elif n%7 == 0:
    if n//7 <8:
        print(Yes)
    else:
        print(No)
elif n%6 == 0:
    if n//6 <7:
        print(Yes)
    else:
        print(No)
elif n%5 == 0:
    if n//5 <6:
        print(Yes)
    else:
        print(No)
elif n%4 == 0:
    if n//4 <5:
        print(Yes)
    else:
        print(No)
elif n<9:
    print(Yes)
else:
    print(No)

Submission status: Runtime Error

Solution code:

N=int(input())

a=0
if N>81:
  print('No')
elif N<1:
  print('No')
else:
  for i in range(1,9):
    if N%i==0:
      if N/i<=9:
	    print('Yes')
      	a=1
      	break
  if a==0:
    print('No')

Submission status: Runtime Error

Solution code:
a=input()
for i in range(9):
 if a%(9-i)==0 and a/(9-i)<10:
  print("yes")
  break
else:
 print("no")

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

if __name__ == "__main__":
    a = int(input())
    a = int(a)
    b = prime_factorize(a)
    c = len(b)
    if c==1:
        if b[0]<=9 and b[0]>=1:
            print('yes')
        else :
            print('no')
    elif c==2:
        if b[0]<=9 and b[0]>=1 and b[1]<=9 and b[1]>=1:
            print('yes')
        else :
            print('no')
    else :
        while len(b) > 2:
            b1 = b.pop(0)
            b2 = b.pop(0)
            b.append(b1*b2)
        if b[0]<=9 and b[0]>=1 and b[1]<=9 and b[1]>=1:
            print('yes')
        else :
            print('no')

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(2,10):
  while n%i == 0:
    n = n/i
if n==1:
  print("Yes)
else:
        print("No")

Submission status: Runtime Error

Solution code:
import sys
a = map(int, input().split())
k = range(1,a)
for s in k:
 res = a/k
 if isinstance(res, int):
  if len(k) == 1:
   if len(res) == 1:
    #print(res,k)
    print("Yes")
    sys.exit()
print("No")

Submission status: Runtime Error

Solution code:
#B

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct


n = int(input())

f = factorize(n)
#print(f)
f.sort()
#print(f)

ans = False


l = len(f)
dex = 0
a = f[0]
while l > 2 and dex < len(f)-1:
    if a * f[dex+1] < 10:
        dex += 1
        a *= f[dex]
        l -= 1
    else:
        break

b_dex = dex+1
b = 1
while b_dex < len(f):
    b *= f[b_dex]
    b_dex += 1

#print(a,b)
if a < 10 and b < 10:
        ans = True

if ans:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n = int(input())

for i in range(9):
  i += 1
  if (n > 81):
    flag = 1
    break
  if n % i == 0:
    if (0 <= n/i <= 9):
      break
    else:
      continue
  else:
    if (i == 9):
      flag = 1
    else:
      continue

if (flag == 0):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
def make_divisors(n):
  kuku = False
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      x = i
      if i != n // i:
        y = n//i
    if x<=9 and y<=9:
      kuku = True
      break
  return kuku
  
n = int(input())
kuku = make_divisors(n)
print(kuku)

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

if __name__ == "__main__":
    a = int(input())
    a = int(a)
    b = prime_factorize(a)
    print(b)
    c = len(b)
    if c==1:
        if b[0]<=9 and b[0]>=1:
            print('yes')
        else :
            print('no')
    elif c==2:
        if b[0]<=9 and b[0]>=1 and b[1]<=9 and b[1]>=1:
            print('yes')
        else :
            print('no')
    else :
        while len(b) > 2:
            b1 = b.pop(0)
            b2 = b.pop(0)
            b.append(b1*b2)
        print(b)
        if b[0]<=9 and b[0]>=1 and b[1]<=9 and b[1]>=1:
            print('yes')
        else :
            print('no')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
if N>=1 and N<=81 and N!=30 and N!=50 and N!=60 and N!=70 and N!=80:
  print("Yes)
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(1, 10):
  for k in range(1,10):
    if N == i * k:
      print("Yes")
      sys.exit()
print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
list = [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]

if list in n:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
n = int(input())
if n < 11 or n == 12 or n == 14 or n == 15 or n == 16 or n == 18 or n == 20 or n == 24 or n == 25  or n == 27  or n == 28   or n == 30  or n == 32  or n == 35  or n == 36  or n == 40  or n == 42   or n == 45  or n == 48  or n == 49   or n == 54   or n == 56   or n == 64   or n == 72   or n == 81  :
  print('Yes')
  eixt()
print('No')

Submission status: Runtime Error

Solution code:
N=int(input())

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

Submission status: Runtime Error

Solution code:
    n=int(input())
    for i in range(1,10):
        if n/i ==n//i and n//i<=9:
            print("Yes")
            exit()
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())

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