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: Runtime Error

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

n = int(input())

if n > 81:
    print('No')
    sys.exit()
if n < 10:
  	print('Yes')
    sys.exit()

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

print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = [2,3,4,5,6,7,8,9]
frag = True

if n<=9:
    print("Yes")
else:
    for i in s:
        if n % i == 0:
            flag = False
            print("Yes")
            break
if flag:
    print("No")

Submission status: Runtime Error

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

n=int(input())
print(Judge(n))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())
L=set()
for i in range(2,9):
  for j in range(2,9):
    L.add(i*j)
if N in L:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
N=int(input())

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a or b >= 10:
    print(-1)
else:
    print(a*b)

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(2, N):
    if N%i == 0:
        a = i
        b = N//i
        if a <= 9 and b <= 9:
            break

if N <= 2:
    print("Yes")
elif a <= 9 and b <= 9:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:

tmp = []

for i in range(1,10):
  for l in range(1,10):
    tmp.append(i*l)

cnt = 0
    
for n in tmp:
  if n == x:
    cnt += 1
    
if cnt == 0:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
num = int(input())
flag = True
for x in range(2,10):
  if num % x == 0:
    print("YES")
	flag = False
if flag:
  print("NO")

Submission status: Runtime Error

Solution code:
N=int(input())
if N>81:
  print("No")
else:
  i=1
  while N%i!=0 and i<10
    i+=1
  if i==10:
    print("No")
  else:
    print("Yes")

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(9):
  for j in range(9):
    if N == i * j:
      print('Yes')
      return
print('No')

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split(' '))

if a >= 1 and a <= 9 and b >= 1 and b <= 9:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a = input()
b = 0
if a >= 82:
  print("No")
else:
  for i in range(9):
    for j in range(9):
      if (i+1)*(j+1)==a:
        print("Yes")
        b = 1
        break;
if b == 0:
  print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
aaa = 0
box = []
for i in range(0, 10):
    if N % i == 0:
        box.append(int(N/i))
for k in box:
    if k>=1 and k<=9:
        aaa = 1
        print("Yes")
if aaa ==0:
    print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
if n > 81:
    print("No")
else:
    is_ok = False
    for x in range(1, 10):
        if n % x == 0 and n // x <= 9:
            is_ok = True
            break

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

Submission status: Runtime Error

Solution code:
n = int(input())
a=[]
for i in range(9):
  for j in range(9):
    a.apppend(i*j)
    
for i in a:
  if a[i]==n:
    print("Yes")
    break
  else:
    print("No")

Submission status: Runtime Error

Solution code:
n = int(input())

for i in range(1,10):
	a = n % i
    if !isinstance(a, int):
		print('No')
print('Yes')

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(10):
    for j in range(10):
        if n / i == j:
            print('Yes')

print('No')

Submission status: Runtime Error

Solution code:
import fractions
import math
import os

input = sys.stdin.readline

n = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
aaa = 0
box = []
for i in range(0, 10):
    if N % i == 0:
        box.append(int(N/i))
for k in box:
    if k>=1 and k<=9:
        aaa = 1
        print("yes")
if aaa ==0:
    print("no")

Submission status: Runtime Error

Solution code:
num = int(input())
flag = True
for _ in range(2,10):
  if num % _ == 0:
    print("YES")
	flag = False
if flag:
  print("NO")

Submission status: Runtime Error

Solution code:
n = int(input())
s = [2,3,4,5,6,7,8,9]
frag = False
 
for i in s:
    if n % i == 0:
        print("Yes")
        flag = True
        break
if not flag:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(input())

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

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

Submission status: Runtime Error

Solution code:
N=int(input())
if N>81:
  print("No")
else:
  i=1
  while N%i!=0 and i<10
    i+1
  if i==10:
    print("No")
  else:
    print("Yes")

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(2, N):
    if N%i == 0:
        a = i
        b = N//i
        if a <= 9 and b <= 9:
            break

if N == 1:
    print("Yes")
elif a <= 9 and b <= 9:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = int(input())
for i in 9:
  for j in 9:
    if i*j == A:
      print('Yes')
print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in s:
  if n % s[i] == 0:
    print("Yes")
    flag = True
    break
if not flag:
  print("No")

Submission status: Runtime Error

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: Runtime Error

Solution code:
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: Runtime Error

Solution code:
a,b = map(int,input().split())

if a >= 1 and a <= 9 and b >= 1 and b <= 9:
    print(a*b)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
N=int(input().split())

ans=False
for i in range(9):
  for j in range(9):
    if i*j==N:
      ans=True
      break
print(("No","Yes")[ans])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
#include <cmath>
#include <typeinfo>
#include <set>
#include <bitset>
#include <map>
#include <numeric>
#include <queue>

using namespace std;
typedef long long ll;

int main(){
    int n;
    cin >> n;
    for(int i=1; i<10; i++){
        for(int j=1; j<10; j++){
            if(n==i*j){
                cout << "Yes" << endl;
                exit(0);
            }
        }
    }
    cout << "No" << endl;
}

Submission status: Runtime Error

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

a,b = map(int, input().split())
if a > 9 or b > 9:
  print('-1')
else:
  print(a * b)