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:
n=int(input())
count=0

for i in range(1,10):
    for j in range(1,10):
        if i*j==n:
            count+=1
            break
if count>=1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(raw_input())

found = False
for i in xrange(1, 10):	
  for j in xrange(1, 10):
    if i*j == N:
      found = True
      
print "Yes" if found else "No"

Submission status: Accepted

Solution code:
# ABC144b


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

    # map(int,input().split())

    n = int(input())
    for i in range(1, 10):
        if n % i != 0:
            continue
        for j in range(1, 10):
            if n//i % j != 0:
                continue
            if 0 <= n//i//j <= 1:
                print('Yes')
                exit(0)
    print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = int(input());
flg = 0;
for i in range(1,10):
	for j in range(1,10):
		if i*j==s:
			flg = 1
			break


if flg == 0:
	output = "No" 
else:
	output = "Yes"
print(output);

Submission status: Accepted

Solution code:
num = int(input())
cnt = 0

for i in range(10):
  for j in range(10):
    if i*j == num:
      cnt += 1

if cnt > 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n=int(input())

ret = 'No'
for x in range(1,10):
    for y in range(1,10):
        if x*y == n:
            ret = 'Yes'
            break

print(ret)

Submission status: Accepted

Solution code:
n = int(input())
t = [1, 2, 3, 4, 5, 6, 7, 8, 9]
i = 0
count = 0
for i in t:
  if (n / t[i-1]) in t:
    print("Yes")
    count = 1
    break
if count == 0:
  print("No")

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
for i in range(1,10):
    for j in range(1,10):
        a = i*j
        if a == n:
            print("Yes")
            exit()
        else:
            pass
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"

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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")
           break
    else:
        continue

    break
else:
    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())

import sys

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

print('No')

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    li = list(map(int,input().split()))
    a=li[0]
    for i in range(1,10):
        for o in range(1,10):
            if(a==i*o):
                print("Yes")
                exit(0)
    print("No")

Submission status: Accepted

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

for i in range(1 , 10):
  for j in range(1 , 10):
    if(i * j == N):
      mark = 1
      break
      
if mark == 1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

for A in range(10):
    for B in range(10):
        numlist.append(A * B)

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

Submission status: Accepted

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

for i in range(1, 10):
	for j in range(1, 10):
		if(i * j == number):
			flag = 1
			break

if flag == 1:
	print('Yes')

else:
	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")
        exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

N = int(input())

for num in range(1, 10):
  q, mod = divmod(N, num)
  if mod == 0 and q >= 1 and q <= 9:
    print("Yes")
    sys.exit()

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')
            break
        else:
            continue
    if i * j == n:
        break
    elif i == 9 and i * j != n:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
n = int(input())
half = math.floor(n**0.5)
#print(half)

for i in range(half+1,0,-1):
  if n % i == 0 and 1 <=n/i<=9 :
    print("Yes")
    exit()
print("No")

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
import math 
 
n = int(input())
if n <= 81:
  m = int(round(math.sqrt(n)))
  while True:
    if n % m == 0:
      print("Yes")
      break
    else:
      m += 1
      if m >= 10:
        print("No")
        break
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
	num = int(input())
	for i in range(1,10):
		q, mod = divmod(num, i)
		if mod == 0 and q < 10:
			return "Yes"

	return "No"
if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a = int(input())
j=0
for i in range(9):
    j = j+1
    h=a/j
    if (h.is_integer()):
        if (h <= 9):    
            ans="Yes"
            break
        else:
            ans="No"
    else:
        ans="No"
    

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
num=int(input())
flag=0
i=1
j=1

for i in range(10):
	for j in range(10):
		if i*j == num:
			flag=1

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

Submission status: Accepted

Solution code:
N = int(input())

products = []

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

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

Submission status: Accepted

Solution code:
N = int(input())

flag = False

if N>81:
    print('No')
    
else:
    if N<10 :
        print('Yes')
    else:    
        for div in range(2,10):
            if (N % div)== 0 and (N // div)<10:
                print('Yes')
                flag =True
                break
          
        if not flag:     
            print('No')

Submission status: Accepted

Solution code:
N=int(input())

flag=0;
if N>81:
    print('No')
else:
    for x in range(1,10):
        for y in range(1,10):
            if(x*y==N):
                flag=1;
                break;
    
    if(flag==1):
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
s = int(input())
i = 9
flag = True
while i >= 1:
    if s % i == 0 and s / i <=9:
        print("Yes")
        flag = False
        break
    i -= 1
if flag:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    sc = Scan()
    n = sc.intarr()[0]
    for i in range(1, 10):
        if n % i == 0:
            for j in range(1, 10):
                if i*j == n:
                    print('Yes')
                    quit()
    print('No')


class Scan():

    def intarr(self):
        self.line = input()
        array = self.line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def strarr(self):
        self.line = input()
        array = self.line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


main()

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
import itertools

n = int(input())
for i, j in itertools.product(range(1, 10), repeat=2):
    if i*j == n:
        print('Yes')
        exit()
print(('No'))

Submission status: Accepted

Solution code:
#!/usr/bin/python3
import math

n = int(input())
m = int(math.sqrt(n))

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

Submission status: Accepted

Solution code:
n=int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

import sys

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
A = int(input())
table = set([(i+1)*(j+1) for i in range(9) for j in range(9)])
for i in table:
  if i == A:
    print("Yes")
    break
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
l = [1,2,3,4,5,6,7,8,9]
for i in reversed(l):
  if (x%i == 0)and(x//i<10):
    print("Yes")
    exit()
print("No")

Submission status: Accepted

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

def cal(A):
  for i in range(9):
    for j in range(9):
      if (i+1) *( j+1) == A:
        return 'Yes'
        break
  return 'No'

print(cal(A))

Submission status: Accepted

Solution code:
n = int(input())
ok = False
for a in range(1, 10):
  for b in range(1, 10):
    if a * b == n:
      ok = True
print('Yes' if ok else 'No')

Submission status: Accepted

Solution code:
from sys import stdin
input = int(stdin.readline().rstrip())
output = "No"
for i in range(1, 10):
    if (input % i == 0) & ((input / i) <= 9):
        output = "Yes"
        break
print(output)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

count = 0
for i in range(1,10):
    for j in range(1,10):
        if i*j == n:
            print("Yes")
            count += 1
            break
    else:
        continue
    break
if count == 0:
    print("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=1
    break
if f==0:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
n = int(input())
kuku =[i * j for i in range(1, 10) for j in range(1, 10)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N=int(input(''))
for i in range(1,10,1):
    if N%i==0 and N/i <= 9:
        print('Yes')
        sys.exit()
print('No')

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

ans = "No"
for A in range(1, 10):
    for B in range(1, 10):
        if( A*B == N ):
            ans = "Yes"
            break
        else:
            ans = "No"
    if( ans == "Yes" ):
        break
    
print( ans )

Submission status: Accepted

Solution code:
N = int(input())

flag = 0

for i in range(1,10):
    mod = N % i
    Int = int(N/i)
    if mod == 0 and Int < 10:
        print("Yes")
        break
    if i == 9:
        flag += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input().strip())

one_nine=[1,2,3,4,5,6,7,8,9]
flag=True

for i in range(1,9+1):
   if(N/i in one_nine):
      print("Yes")
      flag=False
      break
if(flag):
   print("No")

Submission status: Accepted

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

n = int(input())

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

Submission status: Accepted

Solution code:
x= int(input())
flag = 0
for j in range(9):
    for k in range(9):
        if (j+1)*(k+1) == x:
            flag=1
if flag: print("Yes")
else: print("No")

Submission status: Accepted

Solution code:
# # 整数の入力
# a = int(input())
# # スペース区切りの整数の入力
# b, c = map(int, input().split())
# # 文字列の入力
# s = input()
n = int(input())

ans = "No"

for i in range(1, 10):
    if n < 100 and n / i == n // i and n / i < 10:
        ans = "Yes"

print(ans)

Submission status: Accepted

Solution code:
N =int(input())

for i in range(1,10):
    for j in range(i,10):
        if N == i*j:
            print("Yes")
            break
    else: continue
    break
else:print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
for i in range(1,10):
    for j in range(1,10):
        if N == i*j:
            print("Yes")
            quit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

a = 1
while a <= 9:
    if N % a == 0:
        if N / a <= 9:
            print('Yes')
            break
    a += 1
    if a == 10:
        print('No')

Submission status: Accepted

Solution code:
a_b = int(input().rstrip("\n"))

for a in range(1,10):
  b, remain = divmod(a_b, a)
  if remain > 0:
    continue
  if 1 <= b <= 9:
    print("Yes")
    break
else:
  print("No")

Submission status: Accepted

Solution code:
A = int(input())
for i in range(1,10):
    for j in range(1,10):
        if A==i*j:
            print('Yes')
            quit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(10):
    c = b / (i + 1)
    if i == 9:
        print("No")
        break
    if (c.is_integer() == True) & (c < 10):
        print("Yes")
        break

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
b = [N/1,N/2,N/3,N/4,N/5,N/6,N/7,N/8,N/9]
check = 0
for a in b:
    if float(a) == int(a) and a < 10 :
        check += 1
if check > 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())

flag = 0
for i in range(1, 10): 
  if n % i == 0 and n // i < 10 and 0 < n // i:
    print("Yes")
    flag = 1
    break
if flag == 0:
	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())
a=0
for i in range(1,10):
    for j in range(1,10):
        S=i*j
        if S==N:
            a=1
            break
    if a==1:
        break
if a==0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
N = int(input())

flag = False
for i in range(1, N+1):
  if N%i == 0:
    if N//i < 10 and i < 10:
      flag = True
      break
      
if flag:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
a = int(input())
d = 0
for i in range(1,10):
  if a/i<10 and a%i == 0:
    d = 1
    break

if d == 1:
  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:
def eightyone(data):

    for x in range(1,10):
        for y in range(1,10):
            if data == x * y:
                return "Yes"

    return "No"

input_data = int(input())

print(eightyone(input_data))

Submission status: Accepted

Solution code:
n = int(input())

for i in range(1, 11):
    for j in range(1, 10):
        if n == i * j:
            print("Yes")
            break
        elif i == 10:
            print("No")
            break
    else:
        continue
    break

Submission status: Accepted

Solution code:
n = int(input())
for i in range(0,10):
  for j in range(0,10):
    if i*j==n:
      print('Yes')
      exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import time
st_time=time.time()

from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
ts=time.time()
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
show_flg=False
show_flg=True


n=I()
d=[]
for i in range(1,10):
    for j in range(1,10):
        d+=[i*j]
if n in d:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import exit
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())

flag = False
for i in range(1, 10):
  if n % i == 0 and 1 <= n // i <= 9:
    flag = True

print("Yes" if flag else "No")

Submission status: Accepted

Solution code:
N = int(input())
ans = 'No'
for i in range(9):
    q, mod = divmod(N, i+1)
    if mod == 0:
        if q <= 9:
            ans = 'Yes'
            break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
ii = lambda : int(input())

n = ii()

cnt=0
for i in range(1, 10):
    if n%i==0:
        a = n//i
        for j in range(1, 10):
            if a%j==0 and a//j==1:
                cnt+=1

if cnt==0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = 'Yes'
for a in range(1, 10):
    if N % a > 0: continue
    #
    b = N // a
    if 1 <= b <= 9: break
else:
    ans = 'No'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
f = False
for i in range(1,10):
    for j in range(1,10):
        if n == i*j:
            f = True
print('Yes') if f else print('No')

Submission status: Accepted

Solution code:
def main():

    n = int(input())

    if n > 81:
        print('No')
    else:
        k = n // 10 + 1
        while k < 10:
            if n % k == 0:
                print('Yes')
                return
            k += 1
        print('No')

if __name__ == "__main__":
    main()

Submission status: Accepted

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

if state == 0:
    print "No"

Submission status: Accepted

Solution code:
n = int(input())
lst = [list(range(i, 9*i+1, i)) for i in range(1, 10)]
lst = sum(lst, [])
if n in lst:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
    print('No')

Submission status: Accepted

Solution code:
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:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

flag = 0
for i in range(1, 10):
    for j in range(1, 10):
        if i * j == N:
            flag = 1
            break
    if flag == 1:
        break

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
for A in range(1,10):
    if n % A == 0:
        B = n / A
        if 1 <= B <= 9:
            ans = "Yes"
        else:
            ans = "No"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(1, 10):
  x = n / i
  if x.is_integer() and (1 <= x) and (x <= 9):
    flag = 1

print("Yes") if flag == 1 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())
found = False
for i in range(1, 10):
  if n % i == 0:
    if 1 <= n // i <= 9:
      found = True
      break
if found:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n=int(input())
print('No' if n%10==0 and n>10 or n%11==0 or n==96 else 'Yes')

Submission status: Accepted

Solution code:
n = int(input())

for i in range(9):
    
    p, q = divmod(n, 9-i)
    
    if p <= 9 and q ==0:
        print("Yes")
        break

else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
for i in range(1,10):
  if n/i == n//i and n//i<10:
    print('Yes')
    break
else:
  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")
        exit()
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"
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

for num in range(1,10):
  d, m = divmod(N, num)
  if not m:
    if d > 9:
      continue
    else:
      print('Yes')
      break
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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