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())
c=0
for i in range(9):
  if n%(i+1)==0 and n/(i+1)<10 :
    c=1
if c==1:
  print("Yes")
else:
  print('No')

Submission status: Accepted

Solution code:
n=int(input())
for i in range(9):
    for u in range(9):
        if n==(i+1)*(u+1):
            print('Yes')
            exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
if n == 1:
    print("Yes")
    quit()
a = list(range(1,10))
a.reverse()
for _ in range(2):
    for i in a:
        if n % i == 0:
            if n // i == 1:
                print("Yes")
                quit()
            n = n // i
            break
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# abc144 b
#

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """10"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """50"""
        output = """No"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """81"""
        output = """Yes"""
        self.assertIO(input, output)


def resolve():
    N = int(input())

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


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

some()

Submission status: Accepted

Solution code:
import itertools

N = int(input())

flag = 0

for i, j in itertools.product(range(9), repeat=2):
    if (i + 1) * (j + 1) == N:
        print('Yes')
        flag = 1
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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 stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

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:
# 81
N = int(input())
ct = 0
for i in range(10):
    for j in range(10):
        if i * j == N:
            ct += 1
if ct == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
# mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

left = 1
right = n
cnt = []
while n % 2 == 0:
    n //= 2
    cnt.append(2)

f = 3
while f * f <= n:
    if n % f == 0:
        n //= f
        cnt.append(f)
    else:
        f += 2

cnt.append(n)

for i in range(len(cnt)):
    left *= cnt[i]
    right //= cnt[i]
    if left < 10 and right < 10:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())

flag = False
for i in range(10):
    for j in range(10):
        if N == i*j:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
num = int(input())

n = 1
while n < 10:
  if num % n == 0 and num // n < 10:
    print('Yes')
    break
    
  n += 1
    
if n == 10:
  print('No')

Submission status: Accepted

Solution code:
A = int(input()) 
ans = min([A//i for i in range(1,10) if A%i == 0], default = 0)

print("Yes") if 1<=ans<=9 else print("No")

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    is_able = False

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
ans = "No"
for i in range(1,10):
    div,mod = divmod(N,i)
    if (mod == 0) and (div < 10):
        ans = "Yes"
        break
        
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def eighty_one(a):
    for n in range(9, 0, -1):
        if a % n == 0:
            if a // n > 9:
                return False
            else:
                return True
    return False

n = int(input())
if eighty_one(n):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for n in range(1,10):
  for m in range(1,10):
    A.append(n*m)

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

Submission status: Accepted

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

n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

ans = "No"

for x in range(1,10):
  for y in range(1,10):
    if N == x*y:
      ans = "Yes"
      break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

ans = "No"
for s in range(1, 10):
    if N % s != 0:
        continue
    else:
        if int(N/s) <= 9:
            ans = "Yes"
            break
            
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
numlist = [1,2,3,4,5,6,7,8,9]
flag = False

for i in numlist:
  ans1 = n / i
  for j in numlist:
    ans2 = ans1 / j
    if ans2 == 1:
      flag = True
      
if flag:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = 'No'
if N<=82:
    for i in range(1,10):
        if N%i==0 and len(str(N//i))==1:
            ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
import itertools
t = set()
for i, j in itertools.product(range(1, 10), repeat=2):
  t.add(i*j)
n = int(input())
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):
  mod,ret = divmod(n,i)
  if ret == 0 and  mod <= 9:
    print('Yes')
    sys.exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a =  [x for x in range(1,10)]

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

Submission status: Accepted

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

Submission status: Accepted

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

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)

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

ans = 0
ama = 0

for i in range(1, 10):
    ans = n / i
    ama = n % i

    if i == 9 and ama != 0:
        print("No")
    if i <= 9 and ans <= 9 and ama == 0:
        print("Yes")
        exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    for i in range(9):
        for j in range(9):
            if((i+1)*(j+1) == N):
                print("Yes")
                flag = True
        if flag:
            break
    else:
        print("No")


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

n = int(input())

flag = False

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

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

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

for i in range(len(a)):
    if N==a[i]:
        print('Yes')
        sys.exit()
    else:
        continue

print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools

N = int(input())
st = set(x * y for x, y in itertools.product(range(1, 10), repeat=2))
print('Yes' if N in st else 'No')

Submission status: Accepted

Solution code:
N = int(input())
a = []
for i in range(10):
  for j in range(10):
    a.append(i * j)
 
print("Yes") if N in a 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"

print(ans)

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:
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 == n/i and n//i in range(1,10):
        print('Yes')
        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 i*j==N:
            print("Yes")
            exit()
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())

x = 'No'
if 1 <= n <= 81:
    for s in range(1,10):
        for t in range(1,10):
            if n == s*t:
                x = 'Yes'
print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

    def check():
        for i in range(1, 10):
            for j in range(1, 10):
                if i * j == N:
                    return True
        return False

    cond = check()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

print("Yes") if n in ans 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()
print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

if flag == 0:
    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:
data = set()
for i in range(1,10):
    for j in range(1,10):
        data.add(i*j)
if int(input()) in data:
    print("Yes")
else:
    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
        break
    if ans==1:
      break
  if ans==1:
    print("Yes")
  else:
    print("No")

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():

    N = int(input())

    case = []

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

    if N in case:
        ans = 'Yes'

    else:
        ans = 'No'

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

k = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = input()
multiplication_table_List = []
for i in range(1,10):
    for j in range(1,10):
        multiplication_table_List.append(str(i*j))
if n in multiplication_table_List:
    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()
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())
bol = 0
for i in range(1,10):
  for j in range(1,10):
    if i*j == n:
      bol = 1
      break
if bol == 1:
  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 += [i*j]

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

Submission status: Accepted

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

for i in range(1,10):
  for j in range(1,10):
    a.append(i*j)
else:
  if n in a:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

n = int(input())
if n in l:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
is_yes = False
for i in range(1, 10):
    for j in range(1, 10):
        if i * j == n:
            is_yes = True

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

Submission status: Accepted

Solution code:
# abc144_b.py
# https://atcoder.jp/contests/abc144/tasks/abc144_b

# B - 81 /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点

# 問題文
# 高橋君は九九を覚えたので、1以上 9 以下の 2つの整数の積を計算することができます。
# 整数 Nが与えられるので、N を 1 以上 9 以下の 2つの整数の積として表すことができるか判定し、
# できるなら Yes を、できないなら No を出力して下さい。

# 制約
#     1≤N≤100
#     Nは整数である。

# 入力
# 入力は以下の形式で標準入力から与えられる。
# N

# 出力
# Nを 1 以上 9 以下の 2つの整数の積として表すことができるなら Yes を、できないなら No を出力せよ。

# 入力例 1
# 10

# 出力例 1
# Yes

# 例えば 2×5と表すことができます。

# 入力例 2
# 50

# 出力例 2
# No

# 50を 1 以上 9 以下の 2つの整数の積として表すことはできません。

# 入力例 3
# 81

# 出力例 3
# Yes


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    N = int(lines[0])
    # N, M = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

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

    if N in lst:
        result = 'Yes'
    else:
        result = 'No'

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['10']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['50']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['81']
        lines_export = ['Yes']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

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

flag = False
for i in range(9, 0, -1):
    q, r = divmod(N, i)
    if r == 0 and q < 10:
        flag = True
            
if flag:
    print('Yes')
else :
    print('No')

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

ans = False

for j in range(1,10):
    for k in range(1,10):
        if j*k == n:
            ans = True
            break
    if ans:
        break

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

Submission status: Accepted

Solution code:
N=int(input())
for num in range(1,10):
    if (N/num).is_integer() and 1<=(N/num)<=9:
        print("Yes")
        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 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:
            ans='Yes'
            print('Yes')
            sys.exit()
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)]
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)
kuku = list(set(kuku))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Submission status: Accepted

Solution code:
n = int(input())
#a, b = map(int, input().split())
#l = list(map(int, input().split()))
#s = input()

for i in range(1,10):
    q, mod = divmod(n,i)
    if mod == 0:
        if (q >= 1 and q <= 9):
            print("Yes")
            exit()
print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = set(filter(lambda x : n % x == 0 and n / x < 10, [x for x in range(1, 10)]))
print("No" if len(s) == 0 else "Yes")

Submission status: Accepted

Solution code:
n = int(input())

def solve(n: int) -> str:
  for l in range(1, 10):
    for m in range(1, 10):
      if n == l * m:
        return "Yes"
  return "No"
  
print(solve(n))

Submission status: Accepted

Solution code:
N = int(input())
res = False
for i in range(1,10):
  for j in range(1,10):
    if i*j == N:
      res = True
      break
  if res:
    break

if res:
  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())
res = "No"
for i in range(1,10):
  for j in range(1,10):
    if N == i * j:
      res = "Yes"
print(res)