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())
l=[1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 4, 6, 8, 10, 12, 14, 16, 18, 3, 6, 9, 12, 15, 18, 21, 24, 27, 4, 8, 12, 16, 20, 24, 28, 32, 36, 5, 10, 15, 20, 25, 30, 35, 40, 45, 6, 12, 18, 24, 30, 36, 42, 48, 54, 7, 14, 21, 28, 35, 42, 49, 56, 63, 8, 16, 24, 32, 40, 48, 56, 64, 72, 9, 18, 27, 36, 45, 54, 63, 72, 81]
if n in l:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N=int(input())

f=False
for i in range(9):
    for j in range(9):
        ans=(i+1)*(j+1)
        if ans== N:
            f=True
            break
if f:
    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:
import sys
n = int(input())
for i in range(1, 10):
    for j in range(1, i+1):
        if n == i*j:
            print("Yes")
            sys.exit()
print("No")

Submission status: Accepted

Solution code:
from bisect import bisect_left,bisect_right
import sys
def input(): return sys.stdin.readline().strip()

def main(bisect_left=bisect_left, bisect_right=bisect_right):
    n = int(input())
    for i in range(1,10):
        for j in range(1,10):
            if i * j == n:
                print('Yes')
                return
    print('No')
main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    N=ii()
    for i in range(1,10):
        for j in range(1,10):
            if i*j==N:
                print('Yes')
                exit()
    print('No')
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, = [list(map(int, s.split())) for s in open(0)][0]
tf = False
for i in range(1,10):
    for j in range(1,10):
        if i*j == a:
            tf = True
            break
    if tf:
        break

if tf:
    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)
print("Yes" if n in kuku else "No")

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
n=int(input())
a=True
for i in range(1,10):
    if ((n/i)*10)%10==0:
        if n/i<10:
            print("Yes")
            a=False
            break

if a:
    print("No")

Submission status: Accepted

Solution code:
import sys

N = int(input())

for A in range(10):
    for B in range(10):
        if A * B == N:
            print('Yes')
            sys.exit()
print('No')

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
for i in range(1,10):
    for j in range(1, 10):
        if i*j == n:
            print("Yes")
            sys.exit()
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 == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

results = []

for i in range(10):
    for j in range(10):
        results.append(i*j)

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

Submission status: Accepted

Solution code:
n=int(input())
a=set()
for i in range(1,10):
    for j in range(1,10):
        a.add(i*j)
print('Yes' if n in a else '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:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

  return 'Yes' if N in S else 'No'

print(solve())

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

myset = set()

for i in range(1, 10):
    for j in range(1, 10):
        myset.add(i*j)

if n in myset:
    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 in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
        ans = 'Yes'
        break
else:
    ans = 'No'
print(ans)

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

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    n = II()
    ans = set()
    for i in range(1, 10):
        for j in range(1, 10):
            ans.add(i*j)
    if n in ans:
        print("Yes")
    else:
        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, 10):
        if not i * j == N: continue
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

outStr = "No"
for i in range(9,0,-1) :
    for k in range(9,0,-1) :
        if (i*k == N) :
            outStr = "Yes"

print(outStr)

Submission status: Accepted

Solution code:
import collections
import numpy as np

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

N = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    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())
l = []
for i in range(9):
    for j in range(9):
        l.append((i+1)*(j+1))
l = set(l)
if N in l:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

def readInts():
  return [int(s) for s in input().split(" ")]

def solve(N):
  for i in range(1, 10):
    if N % i == 0 and N // i <= 9:
      return 'Yes'
  return 'No'

def main():
  N = readInts()[0]
  print(solve(N))

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000)
from math import factorial, ceil, floor
from bisect import bisect_right as bsr
from operator import itemgetter as ig
from collections import defaultdict as dd
from collections import deque, Counter as cnt

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)
def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]
def nlist(n, v):
    if not n: return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]

# エントリーポイント
def main():
    N = input(int)
    for a in range(1, 10):
        for b in range(1, 10):
            if a * b == N:
                print("Yes")
                exit()
    else:
        print("No")

    return

if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

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

    a_s = set([i*j for i in range(1, 10) for j in range(1, 10)])

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
State = "No"
for A in range(10):
    for B in range(10):
        if A*B==N:
            State = "Yes"
print(State)

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

Submission status: Accepted

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

Submission status: Accepted

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

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int):
    for i in range(1,10):
        for j in range(i,10):
            if N == i*j:
                print(YES)
                return
    print(NO)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import sys

#input = sys.stdin.readline

#import bisect

def main():
#    h,w,a,b = map(int, input().split())
    a=[]
    for i in range(9):
        for j in range(9):
            a.append((i+1)*(j+1))
    n=int(input())
    if n in a:
        print("Yes")
    else:
        print("No")






if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__': main()

Submission status: Accepted

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

from sys import stdin, stderr

def main():
   N = int(stdin.readline())
   L = [ a*b for a in xrange(1, 10) for b in xrange(1, 10) ]

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

   return 0

if __name__ == '__main__': main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
hoge = []

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

N = int(input())
if N in hoge:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)


def main():
    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")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

#a, b, c, d = (int(i) for i in input().split())
#a = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
frag = False
for a in range(10):
    for b in range(10):
        if a * b == N:
            frag = True

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

Submission status: Accepted

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

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

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
for i in range(1, 10):
    if N // i == N / i and N // i <= 9:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
key = 0
for i in range(1, 10):
    for j in range(1, 10):
        if n/(i*j) == 1 and n%(i*j) == 0:
            key = 1
            break
    if key == 1:
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

N = int(input())

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

print("No")

Submission status: Accepted

Solution code:
# = map(int, input().split())
n = int(input())
# = input()
# = list(map(int, input().split()))

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

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

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = set()
for i in xrange(1, 10):
  for j in xrange(1, 10):
    s.add(i * j)
print 'Yes' if int(raw_input()) in s 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:
# import sys
# sys.setrecursionlimit(200000)

N = list(map(int, input().split(" ")))[0]

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

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

Submission status: Accepted

Solution code:
def read_values():
    return map(int, input().split())


def read_list():
    return list(map(int, input().split()))


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

    for a in range(9, 0, -1):
        if N % a != 0:
            continue
        b = N // a
        if 1 <= b <= 9:
            print("Yes")
            return

    print("No")


if __name__ == '__main__':
    f()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

n = int(sys.stdin.readline().strip())
s = set()
for i in range(1,10):
    for j in range(1,10):
        s.add(i*j)
#
if n in s: print('Yes')
else: print('No')

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
a = int(input())
ans = 0
for i in range(10):
    for j in range(10):
        if i*j == a:
            ans = 1
print("Yes") if ans == 1 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:
def main():
    n = int(input())

    ans = "No"
    for i in range(1, 10):
        q, r = divmod(n, i)
        if 1 <= q <= 9 and r == 0:
            ans = "Yes"
            break

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()

for i in range(1, 10):
  if N%i == 0:
    tmp = N//i
    if tmp < 10:
      print("Yes")
      exit()
else:
  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 n == i * j :
            ans = True

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

Submission status: Accepted

Solution code:
N = int(input())

for i in range(1,9+1):
    if N % i == 0 and 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):
    if n % i == 0 and 0 < n//i < 10:
        flag = True
        break

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

Submission status: Accepted

Solution code:
N = int(input())

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

print("No")

Submission status: Accepted

Solution code:
n=int(input())

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

solve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

    n = int(input())

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


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
n=int(input())
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())
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 >= 1 and n/i <= 9:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
A = [i for i in range(1,10)]
B = [i for i in range(1,10)]

ans = []
for a in A:
    for b in B:
        ans.append(a*b)
ans = set(ans)
if N in ans:
    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<=9:
        flag=True
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:

def nums():
    return list(map(int,input().split(" ")))
def num():
    return int(input())

"""
a,b = nums()
if a <= 9 and b <= 9:
    print(a * b)
else:
    print(-1)
"""

n = num()
qq = []
for i in range(10):
    for j in range(10):
        qq.append(i * j)
if n in qq:
    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>0:
    print("Yes")
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:
s = {i * j for i in range(1, 10) for j in range(1, 10)}
print("Yes" if int(input()) in s else "No")

Submission status: Accepted

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


if __name__ == "__main__":
    test()

Submission status: Accepted

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

Submission status: Accepted

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