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())
flg = False
for i in range(1, 10):
  a  = N % i
  b = N / i
  if (a == 0) and (b > 0 and b < 10):
    flg = True
    break
  
if flg:
  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')
        break
    elif i == 9:
        print('No')

Submission status: Accepted

Solution code:
D = int(input())

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

Submission status: Accepted

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

for i in reversed(range(2,10)):
    if n%i == 0:
        n //= i
        break
if n >= 10:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
N=int(input())
ans="No"
for a in range(1,10):
  for b in range(1,10):
    if N%a==0 and (N//a)%b==0 and N==a*b:
      ans="Yes"
      break
    else:
      pass
print(ans)

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

Submission status: Accepted

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

ans = 'No'
for n in range(10):
    if n == 0:
        continue
    if N / n < 10 and N % n == 0:
        #print('N, nxm: ', N, n, N/n)
        ans = 'Yes'
        break

print(ans)

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
flag = False
for i in range(2, 10):
  flag = flag or (n/i == n//i and n//i <= 9)    
print ("Yes" if n <= 9 or (flag and n <= 81) else "No")

Submission status: Accepted

Solution code:
def func(N):
  for i in range(1,10):
    for j in range(1,10):
      if i*j == N:
        print("Yes")
        return
  print("No")

N = int(input())
func(N)

Submission status: Accepted

Solution code:
n = int(input())
qq = []

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def answerA():
    a, b = map(int, input().split())
    if a < 10 and b < 10:
        result = a * b
    else:
        result = -1

    print(result)


def answer():
    def can_be_devided_by_1d(n):
        result = 'No'
        for i in range(1,10):
            floor, mod = divmod(n, i)
            if mod == 0 and floor < 10:
                result = 'Yes'
        return result

    n = int(input())
    print(can_be_devided_by_1d(n))


if __name__ == '__main__':
    answer()

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
N=int(input())

canDiv=0

for i in range(1,10):
    for j in range(1,10):
        if(i*j==N):
            #print("gagas")
            canDiv = 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

flag = 0

if n <= 81:
    if n % 9 == 0:
        flag = 1
    if n % 8 == 0 and n <= 72:
        flag = 1
    if n % 7 == 0 and n <= 63:
        flag = 1
    if n % 6 == 0 and n <= 54:
        flag = 1
    if n % 5 == 0 and n <= 45:
        flag = 1
    if n % 4 == 0 and n <= 36:
        flag = 1
    if n % 3 == 0 and n <= 27:
        flag = 1
    if n % 2 == 0 and n <= 18:
        flag = 1
    if n <= 9:
        flag = 1

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

Submission status: Accepted

Solution code:
import math

N = int(input())
root = math.sqrt(N)

for i in range(math.floor(root)):
    I = i + 1
    if N % I == 0:
        if N / I < 10 and I < 10:
            print('Yes')
            break
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

for i in [9,8,7,6,5,4,3,2]:
  if n%i==0:
    n=n//i
    break

if n in [9,8,7,6,5,4,3,2,1]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/pypy
N=int(raw_input())

M = set([0, 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 M:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
import math

N = int(input())

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

else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

        
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
import os

input = sys.stdin.readline

n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

N = int(input())

if N in qq:
  print('Yes')
  sys.exit()

print('No')

Submission status: Accepted

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

n = int(input())

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

Submission status: Accepted

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

flag = 0

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

Submission status: Accepted

Solution code:
import heapq as h
 
# a,b = map(int,input().split())
n = int(input())
# l = list(map(lambda x:-int(x),input().split()))
can = 'No'
for i in range(1,10):
  if ((n%i) == 0):
    right = n/i
    if (1<=right) and (right<=9):
      can = 'Yes'
print(can)

Submission status: Accepted

Solution code:
N = int(input())
nums = [1,2,3,4,5,6,7,8,9]
num2 = [1,2,3,4,5,6,7,8,9]

for i in nums:
    for j in nums:
        if i*j == N:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

Solution code:
import sys
n = int(input())
if n == 1:
    print('Yes')
    sys.exit()

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

print('No')

Submission status: Accepted

Solution code:
n = int(input())

ans1 = 0
for i in reversed(range(1,10)):
	if n % i == 0:
		ans1 = i
		break

if ans1 == 0:
	print('No')
else:
	if n // ans1 < 10:
		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 <= 9 and n//i >= 1:
        ans = "Yes"
        break
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

a = []
for i in range (9):
	for j in range(9):
		a.append((i+1) * (j+1))
if n in a:
	print ("Yes")
else:
	print ("No")

Submission status: Accepted

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

Submission status: Accepted

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

if 81 < n:
    print("No")
    sys.exit()

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

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

Submission status: Accepted

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

if ans[n] == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x = int(input())
 
ans = 'No'
for i in range(1, 10):
    if x%i==0 and x//i<=9:
        ans = 'Yes'
        break
        
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:
import sys
N = int(input())
for i in range(1,10):
    for j in range(1,10):
        if N == (i * j):
            print("Yes")
            exit()
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):flag=1


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    mul = [[int(i) * int(j) for i in range(1,10)] for j in range(1,10)]

    for line in mul:
        if N in line:
            print("Yes")
            exit()
    print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    n = int(args[0])

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

    return str(ret)


if __name__ == "__main__":
    print(solve(*[input() for _ in range(1)]))

Submission status: Accepted

Solution code:
N=int(input())
c=[]
for i in range(10):
  for k in range(10):
    if i*k==N:
      c.append("Yes")
    else:
      c.append("No")
if 0<c.count("Yes"):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

S = []

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

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

Submission status: Accepted

Solution code:
N=int(input())

#if N>81:
#  print("No")
#else:
#  for i in range(2,N):
#    if N%i==0:
#      print("Yes")
#      break

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

Submission status: Accepted

Solution code:
from sys import stdin

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

for j in range(1, 10):
    for k in range(1, 10):
        if j * k == N:
            print('Yes')
            exit()

print('No')

Submission status: Accepted

Solution code:
n = int(input())

s = 0
for i in range(1,10):
    if n%i == 0 and n/i < 10:
        s += 1
        break
    else:
        True

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

Submission status: Accepted

Solution code:
all = [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]
n=int(input())  
if n in all:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())


def solve(n):
    if n < 10:
        return "Yes"
    for i in range(2, 10):
        q, r = divmod(n, i)
        # print(q, r)
        if q < 10 and r == 0:
            return "Yes"

    return "No"


print(solve(n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
if N>81:
    print("No")
else:
    p_list=[9,8,7,6,5,4,3,2,1]
    for p in p_list:
        d,m=divmod(N,p)
        if d<10 and m==0:
            print("Yes")
            break
    else:print("No")

Submission status: Accepted

Solution code:
n = int(input())

kuku = {1}
for i in range(1,10):
    for j in range(1,10):
        kuku.add(i*j)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())

QQ = []

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

if A in QQ:
    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:
        a = N // i
        if a <= 9:
            flag = 1

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def solve():
  n = int(input())
  can = False
  for i in range(1,10):
    for j in range(1,10):
      if i*j == n:
        can = True
  if can:
    print("Yes")
  else:
    print("No")
solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import product

kuku = list(map(lambda i: i[0]*i[1], product(range(1,10), range(1,10))))

N = int(input())

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
key = False
if n > 81:
    print('No')
else:
    for i in range(1,10):
        if n % i == 0:
            n2 = n //i
            if 1<= n2 <= 9:
                print('Yes')
                key = True
                break
    if key == False:        
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  x = int(input())
  for i in range(9):
    for j in range(9):
      if (i+1) * (j+1) == x:
        return "Yes"
  return "No"

print(main())

Submission status: Accepted

Solution code:
n = int(input())

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

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

N = int(input())
boolean = False

for i in range(1,10):
    for j in range(1,10):
        if i * j == N:
            boolean = True
            
if boolean == True:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

li = list()
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())

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

print(result)

Submission status: Accepted

Solution code:
def main(n):
    for i in range(9, 0, -1):
        for j in range(9, 0, -1):
            if n == (i * j):
                print('Yes')
                return
    print('No')


if __name__ == "__main__":
    n = int(input())

    main(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

prods = []
for a in range(10):
  for b in range(10):
    prods.append(a*b)
if n in prods:
  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):
    s = i*j
    li.append(s)
if n in li:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())

cnt = False

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

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

Submission status: Accepted

Solution code:
N = int(input())

flg = False
for a in range(10):
    for b in range(10):
        if N == a*b:
            flg = True
            break

if flg:
    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 i*j == n:
            print('Yes')
            sys.exit(0)

print('No')

Submission status: Accepted

Solution code:
i = int(input())

a = []
for x in range(1,10):
    for y in range(1,10):
        a.append(x*y)

if i in a:
    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(0)
print("No")

Submission status: Accepted

Solution code:
N = int(input())
for i in range(1,10):
  m = N/i
  #print(m)
  if m.is_integer() and m>=1 and m<=9:
    print('Yes')
    exit()
print('No')

Submission status: Accepted

Solution code:
n = int(input())
cnt = 0
for i in range(1,10):
    if n/i in {1,2,3,4,5,6,7,8,9}:
        cnt = 1
        break
print("Yes" if cnt == 1 else "No")

Submission status: Accepted

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

for i in range(1,10):
    q = N // i
    mod = N % i
    if mod == 0 and 1<=q<=9:
        print('Yes')
        s=1
        break
if s==0:
    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 N == i * j:
      print('Yes')
      exit()
print('No')

Submission status: Accepted

Solution code:
n = int(input())

import sys

if n <= 9:
    print('Yes')
    sys.exit(0)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = set([x * y for x in range(1, 10) for y in range(1, 10)])
print('Yes' if n in s else 'No')

Submission status: Accepted

Solution code:
N = int(input())

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

if isOk:
    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')
        break
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

# print(kuku)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
list = []
for i in range(1,10):
  for j in range(i,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,1):
    for j in range(1,10,1):
        if n == i*j:
            ans = 'Yes'

print(ans)

Submission status: Accepted

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

if a in ans_list:
        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:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n = int(input().rstrip('\n'))
    ls = [1, 2, 3, 4, 5, 6, 7, 8, 9]
    for i in range(1, 10):
        if n / i in ls:
            print("Yes")
            exit()
    print("No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
# B
n = int(input())
flag = False

for i in range(1, n+1):
    if n%i==0:
        counter = n//i
        if len(str(i))==1 and len(str(counter))==1:
            flag = True
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
ns = lambda: stdin.readline()

N = ni()

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

print(ans)

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    x = int(input())
    for i in range(9, 0 , -1):
        if(x % i == 0):
            q = x / i
            if (q > 9):
                print("No")
            else:
                print("Yes")
            break

Submission status: Accepted

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


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


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
flg=False
for i in range(1,10):
    if float(n/i).is_integer() and n/i<=9:
        flg=True
        break

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

Submission status: Accepted

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

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:
            flag = 1

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

Submission status: Accepted

Solution code:
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
input = sys.stdin.readline
N= int(input())
nine_list = []
for i in range(1,10):
    for j in range(1,10):
        nine_list.append(i*j)
if N in nine_list:
    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(9):
  for j in range(9):
    if (i+1) * (j+1) == N:
      print("Yes")
      quit()
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


def main():
    n = int(input())
    l = [1, 2, 3, 4, 5, 6, 7, 8, 9]
    arr = []
    for x in l:
        for y in l:
            arr.append(x*y)

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


if __name__ == '__main__':
    main()
    1

Submission status: Accepted

Solution code:

N = int(input())

arr = []
flg = False

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

if flg:
    print('Yes')
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
  if ans == 'Yes':
    break
print(ans)

Submission status: Accepted

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


for i in range(1,int(math.sqrt(n))+1):
    if ((n%i == 0) and (i<10) and (n/i<10)):
        print("Yes")
        sys.exit(0)
            
print("No")

Submission status: Accepted

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

print('No')