Problem:


Score : 200 points

Problem Statement

Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.

Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print Yes; if it cannot, print No.

Constraints

1 \leq N \leq 100

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

If N can be represented as the product of two integers between 1 and 9 (inclusive), print Yes; if it cannot, print No.

Sample Input 1

10

Sample Output 1

Yes

10 can be represented as, for example, 2 \times 5.

Sample Input 2

50

Sample Output 2

No

50 cannot be represented as the product of two integers between 1 and 9.

Sample Input 3

81

Sample Output 3

Yes



Sample input:
10


Sample output:
Yes

Submission status: Accepted

Solution code:
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


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

    N = ii()
    for i in range(1, 10):
        j = N / i
        if j.is_integer() and 1 <= j <= 9:
            print('Yes')
            exit()
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

ans = 0
for i in range(9):
    for j in range(9):
        if n%num[i] == 0 and n%num[i] == 0 and n//(num[i]) == num[j]:
            ans = 1
if ans == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

bool = False

for i in range(1, 10):
    q, mod = divmod(N, i)
    if mod == 0 and (1 <= q < 10):
        bool = True
        break

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

Submission status: Accepted

Solution code:
#B
n = int(input())
flg = False
for i in range(1,10):
    amari = n % i
    sho = n // i
    if amari == 0 and 1 <= sho <= 9:
        flg = True
        break

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

Submission status: Accepted

Solution code:
import math
n=int(input())
m=math.floor(math.sqrt(n))
i=1
while i<=m:
  wk=n/i
  if math.floor(wk)==math.ceil(wk) and wk<10:
    print("Yes")
    exit()
  else:
    i+=1
next
print("No")

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

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

    for i in range(1,10):
        a = s % i
        b = s // i

        if a == 0 and b < 10:
            print("Yes")
            break
        if i ==9:
            print("No")
            break

Submission status: Accepted

Solution code:
n = int(input())

x = 0

for i in range(1, 10):
    for j in range(1, 10):
        if i * j == n:
            x += 1
            
if x != 0:
    print('Yes')

else:
    print('No')

Submission status: Accepted

Solution code:
N=int(input())

flag=0

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

Submission status: Accepted

Solution code:
N=int(input())
kk=set()
for i in range(1,10):
    for j in range(1,10):
        kk.add(i*j)
print("Yes" if N in kk 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())
count = 0

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:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    flg=0
    for i in range(1,10):
        if n%i==0:
            if 1<=n//i<=9:
                flg=1
    if flg==1:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

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())
count = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
t=1
#a=[11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79]
for i in range(1,10):
  for k in range(1,i+1):
    if k*i==x:
      print('Yes')
      t=0
      break
  if t==0:break
else:print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = np.arange(1, 10)
B = A[:, None] * A[None, :]
bl = np.in1d(N, B)
print('Yes' if bl else 'No')

Submission status: Accepted

Solution code:
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = np.arange(1, 10)
B = A[:, None] * A[None, :]
bl = np.any(B == N)
print('Yes' if bl 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())

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

print("No")

Submission status: Accepted

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

if int(input()) in l:
    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 N // i < 10:
        flag = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Problem B - 81

# input
N = int(input())

# initialization
num_list = []
for i in range(1, 10):
    for j in range(1, 10):
        num_list.append(i * j)
num_list = list(set(num_list))

# output
if N in num_list:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)


# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

n = int(input())

for i in range(1, 10, 1):
    for j in range(1, 10, 1):
        if i*j == n:
            print("Yes")
            exit(0)

print("No")

Submission status: Accepted

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

if int(input()) in list:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())

ans = 0
for i in range(1,10):
  for j in range(1,10):
    if i*j == n :
      ans += 1

if ans >= 1:
  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 N == i*j:
      ans = "Yes"
      break
print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


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

    N = ii()

    for i in range(1, 10):
        m = N / i
        if m.is_integer() and 1 <= m <= 9:
            print("Yes")
            break
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
for i in range(1,10):
    m=N/i
    if m.is_integer() and 1<=m<=9:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


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

    N = ii()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
X=input()
N=int(X)

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

Submission status: Accepted

Solution code:
l = {i*j for i in range(1,10) for j in range(1,10)}
print('Yes' if int(input()) in l else 'No')

Submission status: Accepted

Solution code:
n = float(input())
ans = 'No'
for l in range(1, 10):
    m = n / l
    if m.is_integer() and 1 <= m <= 9:
        ans = 'Yes'
        break
print(ans)

Submission status: Accepted

Solution code:
import sys
#import bisect
#from collections import deque

def input():
    return sys.stdin.readline().rstrip('\n')

N = int(input())
#D = list(map(int, input().split()))

#D = deque(D)
#sum0 = D.pop()
#hp = 0

T = []

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

if N in T:
    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')
            exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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:
import math
N = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys

n = int(input())

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


print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

i_i = lambda: int(i_s())
i_l = lambda: list(map(int, stdin.readline().split()))
i_s = lambda: stdin.readline().rstrip()

N = i_i()

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

print('No')

Submission status: Accepted

Solution code:
#ABC144.B
N = int(input())
for i in range(1,10):
    if N%i==0 and N/i in range(1,10):
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())

check = 0
for i in range(1, 10):
  amari = N % i
  sho = N // i
  if amari == 0 and 1 <= sho <= 9:
    check = 1

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

Submission status: Accepted

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

for i in range(1,10):
    for j in range(1,10):
        if N == i*j:
            ans += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

if n > 81:
    print("No")

elif n%2 == 0:
    if n%8 == 0:
        if n//8 < 10:
            print("Yes")
        else:
            print("No")
    elif n%6 == 0:
        if n//6 < 10:
            print("Yes")
        else:
            print("No")
    elif n%4 == 0:
        if n//4 < 10:
            print("Yes")
        else:
            print("No")
    else:
        if n//2 < 10:
            print("Yes")
        else:
            print("No")

elif n%3 == 0:
    if n%9 == 0:
        if n//9 < 10:
            print("Yes")
        else:
            print("No")
    else:
        if n//3 < 10:
            print("Yes")
        else:
            print("No")

elif n%5 == 0:
    if n//5 < 10:
        print("Yes")
    else:
        print("No")

elif n%7 == 0:
    if n//7 < 10:
        print("Yes")
    else:
        print("No")

else:
    if n < 10:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
def main():    
    N = int(input())
    for i in range(1,10):
        for im in range(1,10):
            if (im * i) == N :
                return "Yes"
                break
    return "No"
print(main())

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

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:
t = [i * j for j in range(1,10) for i in range(1,10)]
print("YNeos"[int(input()) not in t::2])

Submission status: Accepted

Solution code:
n=int(input())

def res():
    for i in range(1,10):
        if n%i != 0:
            continue
        if n//i >=1 and n//i <= 9:
            return "Yes"
        
    return "No"

print(res())

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())
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())
ans = {i*j for i in range(1,10) for j in range(1,10)}
if n in ans:print("Yes")
else:print("No")

Submission status: Accepted

Solution code:
N = int(input())
kuku = [1, 2, 3, 4, 5, 6, 7, 8, 9]
kuku1 = [a * b for a in kuku for b in kuku]
if N in kuku1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

def is_81(num):
    for d in range(1, 10):
        q, mod = divmod(num, d)
        if mod == 0 and q < 10:
            return True
    return False

num = int(input())

if is_81(num):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())

flg = False
for i in range(1, 10):
    x = N % i
    y = N / i
    if x == 0:
        if (1 <= y <= 9):
            flg = True
            break

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
import sys
import re
from decimal import *

l = sys.stdin.readline()
#l = l.split(' ')
#l = [int(str) for str in l]
n = int(l)

for i in range(1,10):
  for j in range(1,10):
    if(i*j == n):
      print("Yes")
      exit(0)

print("No")

sys.stdout.flush()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = "No"
for i in range(9):
    if n % (i+1) == 0 and n // (i+1) <= 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 len(str(int(N/i)))==1:
    print('Yes')
    break
else:
  print('No')

Submission status: Accepted

Solution code:
n = int(input())

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

print('Yes') if n in table else print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

res = "No"
for i in range(9):
  q, r = divmod(N, i+1)
  if (1 <= q <= 9) and r == 0:
    res = "Yes"

print(res)

Submission status: Accepted

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


for i in range(1,10):
    for j in range(1,10):
        if(i*j==n):
            b=1

print("Yes" if(b==1) else "No")

Submission status: Accepted

Solution code:
N = int(input())

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

print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
r = "No"
for i in xrange(1,10):
    for j in xrange(1,10):
        if i*j == n:
            r = "Yes"
print r

Submission status: Accepted

Solution code:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7

# n = int(input())
# a = list(map(int, input().split()))
n = int(input())


if n > 81:
    print('No')
    exit()

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

print('No')

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    N = int(input())
    multi = {i*j for i in range(1, 10) for j in range(1, 10)}
    if N in multi:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
a = int(input())
s_l = [7,5,3,2]
for i in range(9):
    if a%(9-i)==0:
        if a/(9-i)<=9 and a>0:
            print("Yes")
            break
        else:
            print("No")
            break

Submission status: Accepted

Solution code:
n = int(input())
ls = []
for i in range(1,10):
    for j in range(1,10):
        a = i * j
        ls.append(a)
b = 0
for u in ls:
    if n == u:
        b += 1    
    else:
        continue
if b > 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

def main():
    N = int(input())
    l = [a*b for a,b in itertools.product(range(1,10),range(1,10))]

    ll = list(set(l))

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
flag = False
for a in range(1, 10):
    for b in range(1, 10):
        if N == a * b:
            print("Yes")
            flag = True
            break
    else:
        continue
    break
if flag == False:
    print("No")

Submission status: Accepted

Solution code:
judge = False
N = int(input())
for i in range(9):
    for j in range(9):
        #print((i+1) * (j+1))
        if (i+1) * (j+1) == N:
            judge = True

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

Submission status: Accepted

Solution code:
x = int(input())
a="No"
for i in range(1,10):
  for l in range(1,10):
    if i*l == x:
      a='Yes'
      break
    else:
      continue
print(a)

Submission status: Accepted

Solution code:
n = int(input())
kuku = {a * b for a in range(1, 10) for b in range(1, 10)}

for i in kuku:
    if n == i:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

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

Submission status: Accepted

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