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

Submission status: Accepted

Solution code:
N = int(input())
i = 1
a=list()
while i < 10:
  j = 1
  while j < 10:
    a.append(i*j)
    j = j + 1
  i += 1

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

Submission status: Accepted

Solution code:
# alone
N = int(input())

A = [1,2,3,4,5,6,7,8,9]
test = []

for i in range(9):
    for j in range(9):
        test.append(A[i]*A[j])
    
if N in test:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())

done = False
for i in range(8):
    x = i + 2
    if N % x == 0:
        if N // x < 10:
            print('Yes')
            done = True
            break

if N == 1:
    print('Yes')
    done = True

if not done:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())

ans = False
M = 0
if N <= 81:
    if N % 9 == 0:
        M = N / 9
    elif N % 8 == 0:
        M = N / 8
    elif N % 7 == 0:
        M = N / 7 
    elif N % 6 == 0:
        M = N / 6
    elif N % 5 == 0:
        M = N / 5
    elif N % 4 == 0:
        M = N / 4
    elif N % 3 == 0:
        M = N / 3
    elif N % 2 == 0:
        M = N / 2
    else:
        M = N

    if M <= 9:
        ans = True

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

Submission status: Accepted

Solution code:
N=int(input())
count=0
while N>=2:
  for i in range(9,0,-1):
    if N%i==0:
      N = N/i
      count+=1
      break
  if N>=10:
    N=0
print('Yes' if count<=2 and N==1 else 'No')

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=int(input())
a=0
for i in range(9):
    if A%(i+1)==0 and 1<=A/(i+1) and A/(i+1)<=9:
        a=1

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

Submission status: Accepted

Solution code:
N = int(input())

def judge(N):
  if N == 1:
    return 'Yes'
  for i in reversed(range(1, 10)):
    if N%i == 0 and N//i in range(1, 10):
      return 'Yes'
  else:
    return 'No'

print(judge(N))

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

Submission status: Accepted

Solution code:
N=int(input())
num=9
ans=0
ans_fin=0

for i in range(9):
    if N%num==0:
        ans=N/num
        if ans>=10:
            break;
        else :
            ans_fin+=1
            break;
    else :
        num-=1
if ans_fin==1:
    print('Yes')
else :
    print('No')

Submission status: Accepted

Solution code:
kuku =[]

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

print('Yes' if int(input()) in kuku else 'No')

Submission status: Accepted

Solution code:
N = int(input())

i=-1
for a in range(9):
    for b in range(9):
        if((a+1)*(b+1)==N):
            i*=-1
            N=0
            break
if(i==1):
    print("Yes")
else:
    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 i*j == N:
            f = True
print('Yes' if f else 'No')

Submission status: Accepted

Solution code:
import numpy as np
import itertools

N = int(input())

A = np.arange(1, 10)
B = np.arange(1, 10)

lists = list(itertools.product(A,B))
multis = []
for i in range(len(lists)):
    multi = lists[i][0] * lists[i][1]
    multis.append(multi)
    
if N in multis:
    print('Yes')
else :
    print('No')

Submission status: Accepted

Solution code:
n=int(input())

flag = 0
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())
k = 0
for s in range(1,10):
	if N%s != 0:
		continue
	else:
		n = N//s
		for t in range(s,10):
		 	if n%t != 0:
		 		continue
		 	else:
		 		if n//t == 1:
		 			k =1
if k==1:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())

n = np.array([[1,2,3,4,5,6,7,8,9]])
m = np.array([[1],[2],[3],[4],[5],[6],[7],[8],[9]])
l = (n*m).flatten()

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

Submission status: Accepted

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

for i in range(10)[1:]:
  ans = n/i
  r = n%i
  if(ans<10 and r ==0):
    flg = True
    break
if(flg):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
flag = 'No'

if N < 82:
    for i in range(9,0,-1):
        if N % i == 0 and N // i < 10:
            flag = 'Yes'
            break
else:
    pass

print(flag)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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
      
if Flag==1:
  print('Yes')
  
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
https://atcoder.jp/contests/abc144/tasks/abc144_b
"""
import numpy as np


def calc(N: int) -> bool:
    if N == 1:
        return True
    for i in range(2, 10):
        if N % i == 0 and N / i < 10:
            return True
    return False


def load_input_as_int_array() -> np.ndarray:
    return np.array([int(v) for v in input().split(" ")])


def main() -> None:
    N, = load_input_as_int_array()
    result = calc(N)
    print("Yes" if result else "No")


main()

Submission status: Accepted

Solution code:
N = int(input())
 
a = set()
for i in range(1, 10):
    for j in range(1, 10):
        a.add(i*j)
if N in a:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
i = 1   #かけられる数
result = 'No'
while i < 10:
    j = 1   #かける数
    while j < 10:
        if n == (j*i):
            result = 'Yes'
        j = j + 1

    i = i + 1
print(result)

Submission status: Accepted

Solution code:
N = int(input())

a = 0
b = 0

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

if b == 0:
    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())

ans = 'No'
kuku = [i*j for i in range(1, 10) for j in range(1, 10)]
if n in kuku:
    ans = 'Yes'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

for i in range(1, 10):
  if N % i == 0:
    d = N // i
    if d <= 9:
      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):
            a += 1
if a == 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

div_cnt = 0
if input_num > (9 * 9):
    print('No')
else:
    for i in reversed(range(1, 10)):
        if (input_num % i) == 0 and (input_num / i) < 10:
            print('Yes')
            sys.exit()
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
c=0
if 1 <= N <= 81:
  for i in range(9):
    if (i+1)*1 <= N <=(i+1)*9 and N % (i+1) == 0:
      c+=1
    else:
      c+=0
if c==0:
  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 n / i / j == 1:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

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

a = [1,2,3,4,5,6,7,8,9]

for i in a:
    if N/i in a:
        print("Yes")
        break
    if i == 9:
        print("No")

Submission status: Accepted

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

print(answer)

Submission status: Accepted

Solution code:
dic={}

for i in range(1,10):
    for j in range(1,10):
        if dic.get(i*j,None)==None:
            dic[i*j]=1
        else:
            dic[i*j]+=1

N = int(input())

if dic.get(N,None)==None:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
n=int(input())

arr=[]

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

if n in arr:
    print("Yes")
else:
    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())
Output = ""
for i in range(9):
  for j in range(9):
    if (i + 1) * (j + 1) == N:
      Output = "Yes"
      break
if Output == "Yes":
  print(Output)
else:
  print("No")

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:

def resolve():
    N=int(input())
    for i in range(1,10):
        X=N//i
        MX=N%i
        if MX==0 and X<10:
            print('Yes')
            break
    else:
        print("No")

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
N = int(input())

able = False
for i in range(1, 10):
    for j in range(1, 10):
        if N == i * j:
            able = True
            break
    if able == True:
        break

if able == True:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())

if n > 81:
    print('No')
    exit()
else:
    for i in range(1, 10):
        devide = n / i
        if (devide.is_integer() and devide <= 9):
            print('Yes')
            exit()
        else:
            continue
    print('No')

Submission status: Accepted

Solution code:
m = int(input())

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

Submission status: Accepted

Solution code:
n=int(input()) 

slist=[1,2,3,4,5,6,7,8,9]
for i in slist:
    if n/i in slist:
        print("Yes")
        exit()
    else:
        continue
print("No")

Submission status: Accepted

Solution code:
import fractions

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)
sum = 0
#print(len(divisors))

for i in range(len(divisors)):
  if divisors[i] < 10 and N/divisors[i] < 10:
    sum += 1
    
if sum >= 1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
result = "No"
for i in range(1, 10):
    divided_num = N / i
    amari = N % i
    if divided_num < 10 and amari == 0:
        result = "Yes"

print(result)

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 < 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 == 49   or n == 54   or n == 56 or n == 63    or n == 64   or n == 72   or n == 81  :
  print('Yes')
  exit()
print('No')

Submission status: Accepted

Solution code:
n = int(input())
tmp = []
for i in range(10):
    for j in range(10):
        tmp.append(i * j)

for i in tmp:
    if n == i:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

def solve(n):
    for i in range(1,10):
        for j in range(1,10):
            if i * j == n:
                return "Yes"
    return "No"


print(solve(n))

Submission status: Accepted

Solution code:
N=int(input())
if N/1<=9 and N%1==0:
    print('Yes')
else:
    if N/2<=9 and N%2==0:
        print('Yes')
    else:
        if N/3<=9 and N%3==0:
            print('Yes')
        else:
            if N/4<=9 and N%4==0:
                print('Yes')
            else:
                if N/5<=9 and N%5==0:
                    print('Yes')
                else:
                    if N/6<=9 and N%6==0:
                        print('Yes')
                    else:
                        if N/7<=9 and N%7==0:
                            print('Yes')
                        else:
                            if N/8<=9and N%8==0:
                                print('Yes')
                            else:
                                if N/9<=9 and N%9==0:
                                    print('Yes')
                                else:
                                    print('No')

Submission status: Accepted

Solution code:
n=int(input())
a=0
b=0
end=0
for i in range(9):
    for j in range(9):
        if n==(i+1)*(j+1):
            print("Yes")
            end+=1
            break
        elif i==8 and j==8:
            print("No")
        else:
            pass
    if end==1:
        break

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
data = int(input())
ng_flag = False
for i in range(1, 10):
    if data % i == 0 and data / i <= 9:
        ng_flag = True
if data <= 81 and ng_flag:
    print('Yes')
    exit(0)
else:
    print('No')
    exit(0)

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
import sys
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: Accepted

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

for i in range(9, 0, -1):
    tmp = n/i
    if tmp < 10 and tmp.is_integer():
        ans = "Yes"
        break

print(ans)

Submission status: Accepted

Solution code:
abc = input()
abc_int = int(abc)
ququ = []
checksum = 0
for count1 in range(9):
    for count2 in range(9):
        ququ.append((count1+1)*(count2+1))
for check in ququ:
    if check == abc_int:
        checksum = 1
if checksum == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

C = [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 N in C:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
ans = 0
for n in range(1, 10):
    for m in range(1, 10):
        if n * m == num:
            ans = 1
if ans == 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
n = int(raw_input())
flag =0
for i in range(1,10):
  if n%i == 0 and n/i >= 1 and n/i <=  9:
    flag = 1
if flag:
  print "Yes"
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 i*j==N:
      print("Yes")
      flag = True
      break
  if flag:
    break

else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

result = False
for i in range(1,10):
    q, mod = divmod(N, i)
    if mod == 0 and q < 10 and q > 0:
        result = True
if result:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def precompute():
  dict = {}
  for i in range(1, 10):
    for j in range(1, 10):
      dict[i*j] = 0

  return dict

n = int(input())
dict = precompute()
if n in dict:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
answers = set()
for i in range(9):
    for j in range(9):
        answers.add((i + 1) * (j + 1))
if N in answers:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

res = "No"

if (N <= 81):
    x = 1
    while(x < 10):
        a = N // x
        if (a >= 1 and a <= 9 and a * x == N):
            res = "Yes"
        x += 1

print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a = int(input())

for i in range(9):
    for j in range(9):
        if a == (i+1) * (j+1):
            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')
            exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

for i in range(1,10):
    check = N / i
    if check.is_integer() and check < 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:
        if N//i<=9:
            ans='Yes'
            break

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

if 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: 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:
dp=[int(i*j) for i in range(1,10) for j in range(1,10)]
# print(dp)
# dp=set(dp)
# dp=list(dp)
n=int(input())
# print(n)
if n in dp:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n=int(input())

li=[]
for i in range(1,10):
  for j in range(1,10):
    li.append(i*j)
if n in li:
  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]

flag = False
for a_ in a:
  for b_ in b:
    if a_ * b_ == n:
      flag = True
   
if flag == False:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:

from sys import stdin

n = int(stdin.readline().rstrip())
l = [1,2,3,4,5,6,7,8,9,2,4,6,8,10,12,14,16,18,3,6,9,12,15,18,21,24,27,4,8,12,16,20,24,28,32,36,5,10,15,20,25,30,35,40,45,6,12,18,24,30,36,42,48,54,7,14,21,28,35,42,49,56,63,64,72,81]
ans = n in l
if ans == True:
    ans = "Yes"
else:
    ans = "No"
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())
if N>81:
    print('No')
elif N==1:
    print('Yes')
else:
    for i in range(2,10):
        if N%i==0 and N//i<=9:
            print('Yes')
            break
        elif i==9:
            if N%i==0 and N//i<=9:
                print('Yes')
            else:
                print('No')

Submission status: Accepted

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

def main():
    N=int(input())
    flag = 0
    for i in range(1, 10):
        q = N // i
        mod = N % i
        if mod == 0:
            #print("MMM")
            if q < 10:
                #print("FFF")
                flag = 1
    if flag == 1:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

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)
if N in kuku:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
number = []
for i in range(1,10):
  for j in range(1,10):
    number += [i*j]

n = int(input())
if n in number:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
input_line= int(input())

if input_line <= 81:
    if (input_line / 9) % 1 == 0 and (input_line / 9) <= 9:
        print ('Yes')
    elif (input_line / 8) % 1 == 0  and (input_line / 8) <= 9:
        print ('Yes')
    elif (input_line / 7) % 1 == 0 and (input_line / 7) <= 9:
        print ('Yes')
    elif (input_line / 6) % 1 == 0 and (input_line / 6) <= 9:
        print ('Yes')
    elif (input_line / 5) % 1 == 0 and (input_line / 5) <= 9:
        print ('Yes')
    elif (input_line / 4) % 1 == 0 and (input_line / 4) <= 9:
        print ('Yes')
    elif (input_line / 3) % 1 == 0 and (input_line / 3) <= 9:
        print ('Yes')
    elif (input_line / 2) % 1 == 0 and (input_line / 2) <= 9:
        print ('yes')
    elif (input_line / 1) % 1 == 0 and (input_line / 1) <= 9:
        print ('Yes')
    else:
        print ('No')
else:
    print ('No')

Submission status: Accepted

Solution code:
all = [i * j for i in range(1, 10) for j in range(1, 10)]

print(["No", "Yes"][int(input()) in all])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
r = "No"
for i in range(9):
    if a % (i+1) == 0:
        for j in range(9):
            if (a / (i+1)) / (j+1) == 1:
                r = "Yes"
print("{}".format(r))

Submission status: Accepted

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

Submission status: Accepted

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

i = 1

while i <= 9:
  if n % i == 0 and n / i <= 9:
    print("Yes")
    break;
  i += 1
else:
  print("No")

Submission status: Accepted

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

if n % 9 == 0 and (n/9) <= 9:
   print("Yes")
elif n % 8 == 0and (n/8) <= 9:
   print("Yes")
elif n % 7 == 0and (n/7) <= 9:
   print("Yes")
elif n % 6 == 0and (n/6) <= 9:
   print("Yes")
elif n % 5 == 0and (n/5) <= 9:
   print("Yes")
elif n % 4 == 0and (n/4) <= 9:
   print("Yes")
elif n % 3 == 0and (n/3) <= 9:
   print("Yes")
elif n % 2 == 0and (n/2) <= 9:
   print("Yes")
elif n % 1 == 0and (n/1) <= 9:
   print("Yes")   
else:
   print("No")

Submission status: Accepted

Solution code:
n = int(input())
result = "No"

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

print(result)

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

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

Submission status: Accepted

Solution code:
N = int(input())

for i in range(9):
    for j in range(9):
        if N == (i + 1)*(j + 1):
            print("Yes")
            exit()        
        else:
            continue

print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n = int(input())
flg = False


for i in range(1, 10):
	for j in range(1, 10):
		if n == i * j and flg == False:
			print('Yes')
			flg = True
if flg == False:
	print('No')

Submission status: Accepted

Solution code:
N = int(input())


def solve(N):
    for i in range(1, 10):
        for j in range(1, 10):
            if i * j == N:
                return 'Yes'

    return 'No'


print(solve(N))

Submission status: Accepted

Solution code:
N = int(input())
# N = 10

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:
n = int(input())
f = False
for i in range(1,10):
  if(n%i==0):
    if(len(str(int(n/i)))!=1):
      continue
    print("Yes")
    f = True
    break
if(f == False):
  print("No")

Submission status: Accepted

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 n in list:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = 'No'

for i in range(1, 10, 1):
  d = n // i
  if type(d) is int and d < 10 and n == d * i:
    ans = 'Yes'
    break
    
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8

n = int(input())
ans = False

for i in range(1,10):
    for j in range(1,10):
        if (i*j == n):
            ans =True
            
if ans:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
DEBUG = False
flag = False
for i in range(1,10):
    div = int(N / i)
    if DEBUG:
        print('i = %d : div = %d'%(i,div))
    if i*div == N and div-9 <=0:
        flag = True
    if flag:
        break
        
if flag:
    print('Yes')
else:
    print('No')