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:
from heapq import heappush, heappop
from collections import deque
import re
import math
import functools

def sRaw():
    return input().rstrip("\r")

def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))

INF = 1 << 29


def make1d_arr(n, val=INF):
    return [val for i in range(n)]


def make2d_arr(h, w, val=INF):
    return [[val for i in range(w)]for i in range(h)]


def gcd(a, b):
    if(b == 0):
        return a
    return gcd(b, a % b)


def BFord(n,es):
    v_cost = [INF]*n
    v_cost[0] = 0
    for v in range(n*2):
        for e in es:
            frm = e[0]
            to = e[1]
            if v_cost[to] > v_cost[frm]+e[2]:
                v_cost[to] = v_cost[frm]+e[2]
                if v >= n:
                    v_cost[to] = -INF
        if v == n-1:
            prev = v_cost[:]
    v_cost = [-INF if prev[idx]!=v_cost[idx] else v_cost[idx] for idx in range(n)]
    return v_cost
    
def ZAlgo(s):
    l = len(s)
    A = [0]*l
    i =1
    j =0
    A[0]=l
    while i<l:
        while i+j<l and s[j] == s[i+j]:
            j+=1
        if j==0:
            i+=1
            continue
        A[i]=j
        k=1
        while (i+k<l) and (k+A[k]<j):
            A[i+k] =A[k]
            k+=1
        i+=k
        j-=k
    return A


def main():
    N = iRaw()
    for i in range(1,10):
        for j in range(1,10):
            if i*j == N:
                return "Yes"
    return "No"

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

Submission status: Accepted

Solution code:
import math

ans = "No"

n = int(input())
for i in range(1, int(math.sqrt(n) + 1)):
    if n % i == 0 and n // i <= 9:
        ans = "Yes"
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 191027 B
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

N = int(input())
divs = make_divisors(N)
for i in range(len(divs)):
    if divs[i] < 10 and N / divs[i] < 10:
        print("Yes")
        exit(0)
print("No")

Submission status: Accepted

Solution code:
n = int(input())

for i in range(9,0,-1):
    (div, mod) = divmod(n, i)
    if 0 < div < 10 and mod == 0:
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

Solution code:
N=int(input())
flag=False
for i in range(9):
    for j in range(9):
        if (i+1)*(j+1)==N:
            flag=True
if flag==True:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
flag=0
for i in range(9):
    for j in range(9):
        if (i+1)*(j+1)==N:
            flag=1

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

Submission status: Accepted

Solution code:
N = int(input())
t = False
for i in range(1,10):
    for j in range(1, 10):
        if i*j == N:
            t = True
if t == True:
    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")
        break
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
result = 'No'
i = 1

while i*i <= n:
    if n%i == 0 and 1<= n/i <= 9:
        result = 'Yes'
        break
    i += 1

print(result)

Submission status: Accepted

Solution code:
a = int (input())  

if a>81:
  print("No")
else:
  c = 1
  for i in range(9):
    b = a/(9-i)
    
    if b.is_integer()==True and b<10:
      c = 0
    else:
      c = c*1
  if c==0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
import sys

N =int(input())

for a in range(1,10):
  for b in range(1,10):
    if a*b == N:
      print('Yes')
      sys.exit()
print('No')

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

N = int(sys.stdin.readline())
ok = False
for i, j in itertools.product(range(10), range(10)):
    ok |= i * j == N

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

Submission status: Accepted

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

Submission status: Accepted

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

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

re = set(re)

if input in re:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

for i in range(9):
  for j in range(9):
    if (i+1)*(j+1) == a:
      flag = 1

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

Submission status: Accepted

Solution code:
n=int(input())
flag=0
for i in range(9):
  nn=n/(i+1)
  if(nn<10 and (nn.is_integer())):
    flag=1
    break
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:
            flag = True    
print('Yes') if flag else print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().split() #標準入力　sに値を入れる
ans = 'No'
for i in range(1,10):
    for j in range(1,10):
        num = i * j
        if int(s[0]) == num:
            ans = 'Yes'
            break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

set81 = set(list81)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
num = int(input())
lst = list(range(1, 10))
count = 0
for i in lst:
    if num / i in lst:
        count += 1
if count > 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:
    flag = 1
print("YNeos"[flag!=1::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
for i in [1,2,3,4,5,6,7,8,9]:
  if len(str(a//i)) == 1 and a%i == 0:
    print("Yes")
    break
  else:
    if i == 9:
      print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
N =int(input())
num = [1, 2, 3, 4, 5, 6, 7, 8, 9]
for i in range(1, 10):
    if N % i == 0 and N / i in num:
        count = 1
        break
    else:
        count = 0
if count == 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:
        count = 1
        break
    else:
        count = 0
if count == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
kuku = []
for i in range(1, 10):
  for j in range(1, 10):
    mlt = i * j
    kuku.append(mlt)

N = int(input())

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

Submission status: Accepted

Solution code:
N=int(input())

for i in range(1,10):
    a,b=divmod(N,i)
    if 1 <= a <= 9 and b==0:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
from itertools import product
N = int(input())
 
row = range(1, 10)
clo = range(1, 10)
 
A = 0
for row,clo in product(row,clo):
  if row*clo == N:
    A = "Yes"
if A != "Yes":
    A = "No"
print(A)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(1,10):
  q, mod=divmod(n,i)
  if(q<10 and mod==0):
   print('Yes')
   j=1
   break
   
if(j!=1):
 print('No')

Submission status: Accepted

Solution code:

N = int(input())
flag = False

for i in range(9):
    j = i + 1
    if N % j == 0 and N // j <= 9:
        print("Yes")
        flag = True
        break

if not flag:
    print("No")

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
k = np.arange(1, 10)
print("Yes" if (np.dot(k[:,None] , k[None,:]) == n).sum() else "No")

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
k = np.arange(1, 10)
a = n / k
c = n % k
b = ((c == 0) * (9 >= a) * (a >= 1))

print("Yes" if b.any() else "No")

Submission status: Accepted

Solution code:
b=int(input())
for i in range(1,10):
 if b%i==0 and b//i<10:
    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')
      exit()
print('No')

Submission status: Accepted

Solution code:
n = int(input())

t = 'No'

for i in range(1,10):
	
	for j in range(1,10):
	
		#print(i*j)
		
		if n == i*j:
			t = 'Yes'
	
print(t)

Submission status: Accepted

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

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc144/tasks/abc144_b
import sys
N = int(input())
for i in range(1,10):
    a = N % i
    b = N // i
    if a == 0 and 1<= b <= 9:
        print('Yes')
        sys.exit()
print('No')

Submission status: Accepted

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

for i in range(1,N+1):
  if N%i==0 and max(i,N//i)<=9:
    f = True

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

N = int(input())

for i in range(1,10):
  #print(N,i,N%i,len(str(int(N/i))))
  if N%i == 0 and len(str(int(N/i))) == 1:
    print('Yes')
    sys.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 <= 9 and N/i >= 1:
    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:
N = int(input())

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

print('No')

Submission status: Accepted

Solution code:
num = int(input())

result = False

if num == 1:
	result = True
else:
	for i in range(9, 1, -1):
		if num % i == 0 and num / i <= 9:
			result = True

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
------------------------
author : iiou16
time : 11/01/12:11
------------------------
'''


def main():
    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:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

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)

for k in a:
    if n == k:
        print("Yes")
        break
    elif k == 81:
        print("No")

Submission status: Accepted

Solution code:
n = int(input())
if not isinstance(n, int):
    print("No")
else:
    ran = list(range(1,10))
    product = [x*y for x in ran for y in ran]
    print("Yes") if n in product else print("No")

Submission status: Accepted

Solution code:
n =int(input())
if n<10:
  print("Yes")
  exit()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n =int(input())
if n<10:
    print("Yes")
    exit()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input = int(input())
chars = [i for i in range(1,10)]
for n in chars:
  if input / n in chars:
    print("Yes")
    quit()
print("No")

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
def f(N):
  for i in range(1,10):
    j=N//i
    if i*j==N and (j>=1 and j<=9):
      return(True)
  return(False)
if f(N):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

def solve():
    N = int(input())
    sets = set()
    for i in range(1, 10):
        for j in range(1, 10):
            sets.add(i*j)

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

a = 0
for num1 in range(1,10) :
    for num2 in range(1,10) :
        if N == num1 * num2 :
            a = 1
            break
    if a == 1 :
        break


if a == 1:
    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):
    if i*j not in L:
      L.append(i*j)
if n in L:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n = int(input())
L = []
for i in range(1,10):
  for j in range(1,10):
    if i*j not in L:
      L.append(i*j)
if n in L:
  print('Yes')
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)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
ans = True

for i in range(1,10):
  b = a / i
  if b.is_integer() and 1 <= b < 10:
    print('Yes')
    ans = False
    break
  
if ans:
  print('No')

Submission status: Accepted

Solution code:
ab = input().split(" ")
a = int(ab[0])

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

ans = check(a)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

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


def solve():
    sys.setrecursionlimit(2000)
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n = int(input().rstrip('\n'))
    for i in range(1, 10):
        for j in range(1, 10):
            if n == i * j:
                print("Yes")
                exit()
    print("No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
n=int(input())
for a in range(1,10):
  for b in range(1,10):
    if n==a*b:
      print("Yes")
      exit()
    
print("No")

Submission status: Accepted

Solution code:
def kakezan_list():
    kake_list = list()
    for i in range(1, 10):
        for j in range(1, 10):
            kake_list.append(i*j)
    return kake_list

n = int(input())
#print(kakezan_list())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
def solve(string):
    n = int(string)
    m = set([i * j for i in range(1, 10) for j in range(1, 10)])
    return "Yes" if n in m else "No"


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
kuku_array = np.zeros((9, 9))
for i in range(1,10):
  for j in range(i,10):
    kuku_array[i-1][j-1] = i*j
if np.any(kuku_array == N) == True:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n=int(input())

i=1
l=0
while i<10:
    if n/i==n//i and n//i<10:
        l=l+1
    i=i+1
print("Yes" if l>0 else "No")

Submission status: Accepted

Solution code:
A = [int(x) for x in input().split()]
a=A[0]
boo=False
for i in range(1,10):
    for j in range(1,10):
        if i*j==a:
            print('Yes')
            boo=True
            break
    if boo:
        break
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())

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

print('No')

Submission status: Accepted

Solution code:
n=int(input())
i=1
while i < 10:
  if n%i==0:
    if n/i < 10:
      print("Yes")
      i=10
  i=i+1
if i == 10:
  print("No")

Submission status: Accepted

Solution code:
# coding=utf-8

if __name__ == '__main__':
    N = int(input())

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

    print("No")

Submission status: Accepted

Solution code:
n = int(input())

answer = 'No'
if n > 9:
  for k in range(2, 10):
    if n % k == 0:
      d = n // k
      if 1 <= d and d <= 9:
        answer = 'Yes'
        break
else:
  answer = 'Yes'

print(answer)

Submission status: Accepted

Solution code:
import math
import sys

N=int(input())

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

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

print('Yes' if res else '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())
 
times_table = [list(i*j for i in range(1, 10)) for j in range(1, 10)]
 
print('Yes' if any(n in t for t in times_table) else 'No')

Submission status: Accepted

Solution code:
n = int(input())

times_table = [list(i*j for i in range(1, 10)) for j in range(1, 10)]

print('Yes' if any(n in t for t in times_table) else 'No')

Submission status: Accepted

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

for i in range(1,10):
    for j in range(1,10):
        if i * j == num:
            print("Yes")
            sys.exit()

print("No")

Submission status: Accepted

Solution code:

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


if(__name__ == "__main__"):
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    ans = 0
    for i in range(1,10):
        for j in range(1,10):
            if n == i * j:
                ans = 1
                return ans
                break
        else:
            continue
        return ans
        break

if __name__ == "__main__":
    ans = main()
    if ans == 1:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

result = False

if N > 0 and N < 82:
  for x in range(1,10):
    if (N%x)==0 and (N/x) < 10:
      result = True
if result:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans_sum = []
for i in range(1, round(math.sqrt(n) + 2)):
    if n%i == 0:
        ans = set([])
        if i <10 and n//i <10:
            ans.add(i)
            ans.add(n//i)
            ans_sum.append(ans)
            
if len(ans_sum) > 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a = int(input())
li = []
for i in range(9):
    num_i = i + 1
    for j in range(9):
        num_j = j + 1
        li.append(num_i * num_j)

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
MOD = 1000000007
def POW(x, y): return pow(x, y, MOD)
def INV(x, m=MOD): return pow(x, m - 2, m)
def DIV(x, y, m=MOD): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())

N=II()

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())
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:
data=int(input())
sum=0

for i in range(9):
  a=data%(i+1)
  b=data/(i+1)
  if a==0 and b<=9:
    sum+=1
if sum>=1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

answer = "No"

for i, j in itertools.product(range(1,10), range(1,10)):
  if i * j == N:
    answer = "Yes"
    break

print(answer)