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: Accepted

Solution code:
import sys
from itertools import product
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

N = int(input())
for i, j in product(range(1, 10), repeat=2):
    if i*j == N:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
f = 0
N = int(input())
for x in range(1,10):
    for y in range(1,10):
        if x * y == N:
            f = 1
if f == 1:
    print('Yes')
elif f == 0:
    print('No')

Submission status: Accepted

Solution code:
a=int(input())
if a>81:
  print('No')
  exit()
for i in range(1,10):
  if a % i == 0 and a // i <10:
    print('Yes')
    exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

for i in range(1, 10):
    for j in range(1, 10):
        if i * j == N:
            print("Yes")
            quit()

print("No")

Submission status: Accepted

Solution code:
n = int(input())
ans = 'No'
for x in range(10):
  for y in range(10):
    if n == x*y:
      ans = 'Yes'
      break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

l = []

for i in range(9):
    # print(i + 1)
    for j in range(9):
        # print(j + 1)
        
        l.append((i + 1) * (j + 1))
        
# print(l)

N = int(input())
if N in l:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if n <= 81:
    for i in range(1,10):
        for j in range(1,10):
            if i * j is n:
                ans = True

if ans is True:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def trial_division(n):
    primeN = n
    #素因数を格納するリスト
    factor = []
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    #リストが空ならそれは素数
    if not factor:
        return primeN
    else:
        factor.append(n)
        if factor[-1]==1:
            factor.remove(1)
        return factor
import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
mod = 10**9 + 7
inf = float('inf')
#for i in range(100):
#N = i + 1

N = I()

#print(N)
if N >= 82:
    print("No")
    exit()
elif N == 70 or N == 80 or N == 60:
    print("No")
    exit()
ans = [1]

ans = trial_division(N)
if type(ans) is int:
    if ans >= 10:
        print("No")
    else:
        print("Yes")
elif max(ans) >= 10:
    print("No")
elif 5 in ans and ans.count(5) >= 2 and len(ans) >= 3:
    print("No")
elif 7 in ans:
    if ans.count(7) >= 2 and len(ans) >= 3:
        print("No")
    elif len(ans) >= 4:
        if 3 in ans:
            print("No")
        else:
            print("Yes")
    else:
        print("Yes")
elif len(ans) >= 6 and ans.count(3) >= 1:
    print("No")

else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solv(N):
    for i in range(1, 10):
        if (N % i == 0) and (N / i <= 9):
            return "Yes"
    return "No"

N = int(input())
print(solv(N))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
yes = False
for i in range(1, 10):
    for j in range(1, 10):
        if i * j == N:
            yes = True
            break

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

Submission status: Accepted

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: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import product
N = int(input())

row = range(1, 10)
clo = range(1, 10)

A = 0
for row,clo in product(row,clo):
  if row*clo == N:
    A = "Yes"
if A != "Yes":
    A = "No"
print(A)

Submission status: Accepted

Solution code:
N = int(input())


print("Yes" if N in[i * j for i in range(10) for j in range(10)] else "No")

Submission status: Accepted

Solution code:
n = int(input())
flag = 0
for x in range(1,10):
    for y in range(1,10):
        if x*y == n:
            flag = 1
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
ans = 'No'
l = [1,2,3,4,5,6,7,8,9]
for i in range(1,10):
  if n/i in l:
    ans = 'Yes'
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Solution code:
n=int(input())
if n>81 or 1>n:
	x="No"
else:
	x="No"
	for i in range(1,10):
		if n%i==0:
			if n/i>0 and 10>n/i:
				x="Yes"
				break
print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

judge = False


if N <= 81:
    for i in range(1,10,1):
        for j in range(1,10,1):
            if i*j == N:
                judge = True
                break
        if judge:
            break


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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    a = int(input())
    a = int(a)
    flag=False
    for i in range(1, 10):
        for j in range(1, 10):
            if a == i*j:
                flag=True
                break
        if flag:
            break
            
    if flag==False :
        print('No')
    else :
        print('Yes')

Submission status: Accepted

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: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
li = [i for i in range(1,10)]
flag = False
for i in li:
    if n%i==0:
        if n//i in li:
            flag = True
        else:
            flag = False
if(flag):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
x = [1,2,3,4,5,6,7,8,9]
y = x.copy()
u = []
for i in x:
    for j in y:
      u.append(i*j)
if n in u:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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]

ans = []
for i in range(len(a)):
    for j in range(len(b)):
        ans.append(a[i]*b[j])

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

Submission status: Accepted

Solution code:
N = int(input())

for i in range(9, 0, -1):
    remain = N % i
    if remain == 0:
        break

shou = N / i

if 1 <= shou and shou <= 9:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
flag = 0
for i in range(9):
    if N%(i+1) == 0:
        A = N/(i+1)
        if A <= 9:
            print("Yes")
            flag = 1
            break
if flag==0:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li=[]
ok=False
a=int(input())
for i in range(1,10):
    for j in range(1,10):
        if(i*j==a and a%i==0 and a%j==0 ):
            li.append({i,j})
            break
if(len(li)>=1):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def solve():
    N = int(input())
    if any(((N//i)*i==N) and (1<=N//i<=9) for i in range(1, 10)):
        return 'Yes'
    else:
        return 'No'
        
if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
n = int(input())

def calc(n):
  for i in range(n + 1):
    div = -1
    if(i != 0 and n % i == 0):
      div = n / i
    
    if div < 10 and i < 10 and div != -1:
      return "Yes"
  return "No"

print(calc(n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

flag = -1
for i in range(1,10):
    if (N % i == 0) and (N/i < 10):
        flag = 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

m = 9
while m >= 1:
  if N % m == 0:
    if N/m <= 9:
      print('Yes')
      break
    else:
      print('No')
      break
  
  else:
    m -= 1

Submission status: Accepted

Solution code:
n = int(input())

flag = 0

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: Accepted

Solution code:
num = input()
numlist = [i*j for i in range(1,10,1) for j in range(1,10,1)]
if int(num) in numlist:
    print("Yes")
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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


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

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr



n = int(input())

g = factorization(n)

#print(g)
f = []
for x in g:
    for y in range(1,x[1]+1):
        f.append(x[0])

#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: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

matriz = []
for i in range(1,10):
    for j in range(1,10):
        matriz.append(i*j)

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

Submission status: Accepted

Solution code:
x=int(input())

p=[]
for i in range(9):
    for j in range(9):
        p.append((i+1)*(j+1))

for k in p:
    if k == x:
        print("Yes")
        break
    elif k == 81:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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


for i in reversed(range(1,10)):
    if N % i == 0:
        j = N / i

        if j >= 10:
            print("No")
            flag = 1
            break

        else:
            print("Yes")
            flag = 1
            break

    else:
        continue

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

Solution code:
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

a = set()
for i in range(1,10):
    for j in range(1, 10):
        a.add(i*j)

n = ni()
if n in a:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
flag = 0
for i in range(9,0,-1):
  if n % i == 0:
    if n / i > 9:
      print("No")
      flag = 1
      break
    elif 0 < n / i:
      flag = 1
      print("Yes")
      break
if flag == 0:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
kuku = []

for v in range(1, 10):
    for h in range(1, 10):
        kuku.append(v * h)
        
if N in kuku:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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: Accepted

Solution code:
a = int(input())

i = 1
b = 0

for i in range(1,10):
  if (a % i ==0):
    if(a / i < 10):
      b = b+ 1
      break
    else:
      pass
  else:
    pass
  
if (b == 1):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
x = int(input())
count = 0

if x == 1:
  print("Yes")
  exit()

for i in range(2,10):
  if x % i == 0 and (x // i) <= 9:
    print("Yes")
    exit()
  else:
    continue

print("No")

Submission status: Accepted

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

Submission status: Accepted

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==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==54 or N==56 or N==49 or N==63 or N==64 or N==72 or N==81:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

s = ''
for a in range(1,10) : 
    for b in range(1,10) : 
        if (a*b==n) :
            s = 'Yes'
            break
    

if(s == 'Yes') :
    print('Yes')
else:    
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
kuku=[0]*(81)
for i in range (9):
    for j in range(9):
        kuku[9*i+j]=(i+1)*(j+1)

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

Submission status: Accepted

Solution code:
N =int(input())
ans = False
for i in range(2,10):
    if(N%i == 0 and N//i < 10):
        ans = True

if(ans or N == 1):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:

N =int(input())
ans = 0
if N > 81:
    print("No")
elif N < 10:
    print("Yes")
else:
    for i in range(2,10):
        
        if N % i == 0:
            M = N/i
            if M < 10:
                ans += 1
    if ans > 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n = int(input())

ans = False

for i in range(9, 0, -1):
    if n % i == 0:
        mod = n // i
        if mod < 10:
            ans = True

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

Submission status: Accepted

Solution code:
n = int(input())

for x in range(10):
    for y in range(10):
        ans = x * y
        if ans == n:
            print("Yes")
            exit()

print("No")

Submission status: Accepted

Solution code:
import itertools
t = [x * y for x, y in itertools.product(range(1, 10), range(1, 10))]
x = int(input())
print('Yes' if x in t else 'No')

Submission status: Accepted

Solution code:
N=int(input())
f=0;
for i in range(1,10):
  if (N%i==0 and N/i<10):
    f=f+1
if f>0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# 整数の入力
a = int(input())

flag = 0
for i in range(1, 10):
  if (a % i == 0 and a / i < 10 and a / i >= 1):
    print('Yes')
    flag = 1
    break

if (flag == 0):
  print('No')

Submission status: Accepted

Solution code:
def ABC144_20191027_B():    
    n = int(input())
    flag =False
    for i in range(1,10):
        for j in range(1,10):
            if n == i * j:
                flag = True
                break
    if flag == True:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    ABC144_20191027_B()

Submission status: Accepted

Solution code:
a = int(input())

li = []
for i in range(1,10):
	for j in range(1,10):
		li.append(i * j)

if a in li:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
read = input 
rn = lambda :list(map(int, read().split()))
def reverse_range(r):return range(r-1, -1, -1)
def sol(a):
    s = set()
    for i in range(1, 10):
        for j in range(1, 10):
            s.add(i*j)
    if a in s:
        print("Yes")
    else:
        print("No")
a = rn()[0]
sol(a)

Submission status: Accepted

Solution code:
n = int(input()) 

for i in range (1,10):
  if n/i <= 9 and n%i == 0:
    print("Yes")
    break
else:
  print("No")

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
r = False

for i in range(1,10):
    for j in range(1,10):
        if i*j == n:
           r = True
        if r:
            break
    if r:
        break

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

Submission status: Accepted

Solution code:
n = int(input())
s = [2,3,4,5,6,7,8,9]
flag = True
 
if 1<= n <=9:
    print("Yes")
    flag = False
else:
    for i in s:
        if n % i == 0 and n/i <= 9:
            flag = False
            print("Yes")
            break
if flag:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
lista=[]
list1=[1,2,3,4,5,6,7,8,9]

list2=list(map(lambda x:x*2,list1))
list3=list(map(lambda x:x*3,list1))
list4=list(map(lambda x:x*4,list1))
list5=list(map(lambda x:x*5,list1))
list6=list(map(lambda x:x*6,list1))
list7=list(map(lambda x:x*7,list1))
list8=list(map(lambda x:x*8,list1))
list9=list(map(lambda x:x*9,list1))

lista.append(list1)
lista.append(list2)
lista.append(list3)
lista.append(list4)
lista.append(list5)
lista.append(list6)
lista.append(list7)
lista.append(list8)
lista.append(list9)

ans="No"

for i in range(9):
	for j in range(9):
		if lista[i][j]==n:
			ans="Yes"
			
		
		
print(ans)

Submission status: Accepted

Solution code:
def input_from_console():
    n = int(input())
    return n



def solve(num):
    for i in range(1, 10):
        if int(num/i) <= 9 and int(num/i) == num/i:
            return 'Yes'
    return 'No'



def main():
    n = input_from_console()

    print(solve(n))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  # Check if the python interpreter is in debug mode or not.
        check_cases()
    else:
        main()

Submission status: Accepted

Solution code:
N = int(input())

A = [1]*9
for i in range(0, len(A)):
    A[i] += i
    
flag = 0

for a in A:
    if N%a == 0 and N/a <= 9:
        flag = 1
        break
        
if flag == 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
#import numpy as np
#from numpy import*
#from scipy.sparse.csgraph import shortest_path #shortest_path(csgraph=graph) # dijkstra# floyd_warshall
#from scipy.sparse import csr_matrix
 
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby accumulate
from operator import mul,itemgetter
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)
#input=sys.stdin.readline  #危険！基本オフにしろ！
 
def main():
    n=int(input())
    for i in range(10):
        for j in range(10):
            if i*j==n:
                print("Yes")
                exit()
    print("No")
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
for i in range(1, 10):
    for j in range(1, 10):
        if not i * j == N: continue
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

result = 'No'
for i in range(1,10):
    q1, mod1 = divmod(N, i)
    if mod1 == 0:
        for j in range(i, 10):
           q2, mod2 = divmod(q1, j)
           if (q2 == 1) & (mod2 == 0):
                result = 'Yes'

print(result)

Submission status: Accepted

Solution code:
N=int(input())

list=[]
for i in range(1,10):
  for j in range(1,10):
    list.append(i*j)
if N in list:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = []
i = 1
while i <= 9:
    j = 1
    while j <= 9:
        a.append(i*j)
        j += 1
    i += 1
if n in a:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# coding: utf-8


def main(N):
    for i in range(1, 10):
        if N % i == 0 and N / i<= 9:
            return "Yes"
    return "No"

if __name__ == "__main__":
    N = int(input())
    my_ans = main(N)
    print(my_ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N = int(input())
for i in range(1, 10):
  for j in range(1, 10):
    if(N == i * j):
      print("Yes")
      sys.exit()

print("No")

Submission status: Accepted

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"
print(ans)

Submission status: Accepted

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: Accepted

Solution code:
n = int(input())
ans = []
x = n
for i in reversed(range(2,10)):
    while x%i==0:
        ans.append(i)
        x /=i
        
if len(ans)>2:
    print("No")
elif x>9:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

for i in range(1,10):
    temp = n / i
    if temp.is_integer() == True:
        if temp < 10 :
            print('Yes')
            sys.exit()

print('No')

Submission status: Accepted

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"
            break
print(ans)

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N = int(input())

flg = False
for i in range(9):
    ans = list(map(int, str(N/(i+1)).split(".")))
    if ans[1] == 0 and 0 < ans[0] < 10:
        flg = True
        break
if flg:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

flag = True
for i in range(1, 10):
    for j in range(1, 10):
        if n / i == j:
            print('Yes')
            flag = False
            break
    else:
        continue
    break

if flag:
    print('No')

Submission status: Accepted

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

    divisors.sort()
    return divisors


divisors=make_divisors(n)
#print(divisors)
ans = "No"

if len(divisors)%2 == 0:
    #print("hoge")
    for i in range(len(divisors)//2):
        a,b = divisors[i],divisors[len(divisors)-1-i]
        #print(a,b)
        if (a>=1)&(a<=9)&(b>=1)&(b<=9):
            ans = "Yes"
            break
if len(divisors)%2 == 1:
    for i in range(len(divisors)//2+1):
        if i ==len(divisors)//2:
            a,b = divisors[i],divisors[i]
        else:
            a,b = divisors[i],divisors[len(divisors)-1-i]
        #print(a,b)
        if (a>=1)&(a<=9)&(b>=1)&(b<=9):
            ans = "Yes"
            break
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
t = 0

for i in range(9):
  for j in range(9):
    if n == (i + 1) * (j + 1):
      t += 1
      
if t == 0:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
N = int(input())
def main():
    for i in range(1, 10):
        if not N % i:
            if N / i <= 9:
                print('Yes')
                return
            else:
                continue
        else:
            pass
    print('No')

main()

Submission status: Accepted

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

for i in range(9):
    tmp=i+1
    if (N/tmp)<10 and N%tmp==0:
        ans="Yes"

print(ans)

Submission status: Accepted

Solution code:
n = int(input())


ans = 'No'

for i in range(1,10):
  if ans == 'Yes':
    break
  for j in range(1,10):
    if n == i*j:
      ans = 'Yes'
      break

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

a = n
b = 0
for i in range(9, 0, -1):
    if n%i == 0:
        a = n // i
        break

if 1 <= a <= 9:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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: Accepted

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: Accepted

Solution code:
b = int(input())
flg=0
for i in range(1,10):
    if(flg==1):
        break
    for j in range(1,10):
        if(b==i*j):
            print("Yes")
            flg=1
            break
if(flg==0):
    print("No")