CodeEff/ECCO huggingface dataset:
# Original solution
#!/usr/bin/python3

import math
import sys


DEBUG = False


def inp():
    return sys.stdin.readline().rstrip()


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


def solve(N, A):
    allxor = 0
    for a in A:
        allxor ^= a

    B = [0] * N

    ans = 0
    bcount = 0
    for bit in range(61, -1, -1):
        mask = 1 << bit
        if allxor & mask:
            ans <<= 1
            ans |= 1
            continue

        bset = set()
        for i in range(N):
            b = B[i]
            b <<= 1
            b |= (A[i] & mask) >> bit
            B[i] = b
            bset.add(b)
        bcount += 1

        full_bit = (1 << bcount) - 1

        blist = list(bset)
        blist1 = blist[:len(blist) // 2]
        blist2 = blist[len(blist) // 2:]

        r1 = set([0])
        for b in blist1:
            for c in list(r1):
                r1.add(b ^ c)

        r2 = set([0])
        for b in blist2:
            for c in list(r2):
                r2.add(b ^ c)

        best = full_bit - 1
        for b1 in r1:
            if b1 ^ full_bit in r2:
                best = full_bit
                break

        bestb = best & 1
        ans <<= 1
        ans |= bestb

        if bestb == 0:
            for i in range(N):
                B[i] >>= 1
            bcount -= 1

    return ans + (ans ^ allxor)


def main():
    N = int(inp())
    A = [int(e) for e in inp().split()]
    print(solve(N, A))


if __name__ == '__main__':
    main()


# Optimized solution
#!/usr/bin/python3

import math
import os
import sys


DEBUG = 'DEBUG' in os.environ


def inp():
    return sys.stdin.readline().rstrip()


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


def solve(N, A):
    allxor = 0
    for a in A:
        allxor ^= a

    while len(A) < 61:
        A.append(0)
    M = len(A)

    row = 0
    ans = 0
    for bi in range(61, -1, -1):
        b = 1 << bi
        if b & allxor:
            ans |= b
            continue

        if not (A[row] & b):
            j = -1
            for i in range(row + 1, M):
                if A[i] & b:
                    j = i
                    break
            if j == -1:
                continue

            A[row], A[j] = A[j], A[row]

        assert A[row] & b
        if not (ans & b):
            ans ^= A[row]

        for i in range(row + 1, M):
            if A[i] & b:
                A[i] ^= A[row]
            assert not (A[i] & b)

        row += 1

    return ans + (ans ^ allxor)


def main():
    N = int(inp())
    A = [int(e) for e in inp().split()]
    print(solve(N, A))


if __name__ == '__main__':
    main()
# Original solution
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(eval(input()))
def II(): return list(map(int, input().split()))
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return list(map(list,list(zip(*read_all))))

#################

def F2_GaussJordan(A, is_extended = False):
    rank = 0
    for col in range(len(A[0])):
        if (is_extended and col == len(A[0])-1):
            break
        pivot = -1
        for row in range(rank,len(A)):
            if A[row][col]:
                pivot = row
                break
        if pivot == -1: 
            continue
        A[pivot],A[rank] = A[rank],A[pivot]
        for row in range(rank+1,len(A)):
            if A[row][col]:
                A[row] = [A[row][j]^A[rank][j] for j in range(len(A[0]))]
        rank += 1
    return A

N = I()
A = III()

xor = 0
for i in range(N):
    xor ^= A[i]

max_digit = len(format(max(A), 'b'))

use_digit = []
ans = 0
for j in range(max_digit)[::-1]:
    if xor>>j & 1:
        ans += 2**j
    else:
        use_digit.append(j)

a = [[0]*len(use_digit) for _ in range(N)]
k = 0
for k,j in enumerate(use_digit):
    for i in range(N):
        if A[i]>>j & 1:
            a[i][k] = 1

g = F2_GaussJordan(a,False)

s = 0
for i in range(N):
    s = max(s,s^sum([g[i][j]*2**use_digit[j] for j in range(len(use_digit))]))
ans += 2*s

print(ans)

# Optimized solution
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(eval(input()))
def II(): return list(map(int, input().split()))
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return list(map(list,list(zip(*read_all))))

#################

N = I()
A = III()

xor = 0
for i in range(N):
    xor ^= A[i]

for i in range(N):
    A[i] &= ~xor

max_digit = len(format(max(A), 'b'))
rank = 0
for col in range(max_digit)[::-1]:
    pivot = -1
    for row in range(rank,N):
        if A[row]>>col & 1:
            pivot = row
            break
    if pivot == -1: 
        continue
    A[pivot],A[rank] = A[rank],A[pivot]
    for row in range(rank+1,N):
        if A[row]>>col & 1:
            A[row] ^= A[rank]
    rank += 1

val = 0
for i in range(N):
    val = max(val,val^A[i])

print((2*val + xor))
# Original solution
def maxSubarrayXOR(lis, n, INT_BITS = 60):
    idx = 0
    for i in range(INT_BITS-1,-1,-1):
        Mele = -1
        bit_i = 1 << i
        for j in range(idx, n):
            if lis[j] & bit_i and lis[j] > Mele:
                Midx, Mele = j, lis[j]
        if Mele < 0: continue
        lis[Midx], lis[idx] = lis[idx], lis[Midx]
        for j in range(n):
            if j != idx and lis[j] & bit_i:
                lis[j] ^= lis[idx]
        idx += 1
    res = 0
    for x in lis: res ^= x
    return res

n = int(eval(input()))
a = list(map(int, input().split()))
t = 0
for x in a: t ^= x
b = [x^(x&t) for x in a]
print((t + maxSubarrayXOR(b, n)*2))

# Optimized solution
def maxSubarrayXOR(lis, n, INT_BITS = 60):
    idx = 0
    for i in range(INT_BITS-1,-1,-1):
        Midx = -1
        bit_i = 1 << i
        for j in range(idx, n):
            if lis[j] & bit_i:
                Midx = j
                break
        else: continue
        lis[Midx], lis[idx] = lis[idx], lis[Midx]
        for j in range(n):
            if j != idx and lis[j] & bit_i:
                lis[j] ^= lis[idx]
        idx += 1
    res = 0
    for x in lis: res ^= x
    return res

n = int(eval(input()))
a = list(map(int, input().split()))
t = 0
for x in a: t ^= x
b = [x^(x&t) for x in a]
print((t + maxSubarrayXOR(b, n)*2))
# Original solution
def gauss_jordan(A, is_extended):
    """掃き出し法でジョルダン標準形を求める"""
    cnt_col = len(A[0])
    cnt_row = len(A)

    rank = 0
    for col in range(cnt_col):
        #  拡大係数行列の場合は最後の行は掃き出ししない
        if is_extended and col == cnt_col - 1:
            break

        # ピボットを探す
        pivot = -1
        for row in range(rank, cnt_row):
            if A[row][col]:
                pivot = row
                break

        #  ピボットがない場合は次の列に
        if pivot == -1:
            continue

        # 行をスワップする
        A[pivot], A[rank] = A[rank], A[pivot]

        # ピボットのある列の値がすべて0になるように掃き出す
        A_rank = A[rank]
        for row in range(cnt_row):
            if row != rank and A[row][col]:
                for col2, A_rank_col2 in enumerate(A_rank):
                      A[row][col2] ^= A_rank_col2
        rank += 1

    return A


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

# 全てのxorを計算
# 全てのaを2進数に変換
max_a = max(a)
max_a = bin(max_a)[2::]
xor_sum = 0
for i in range(n):
    xor_sum ^= a[i]
xor_sum = bin(xor_sum)[2::].zfill(len(max_a))

for i in range(n):
    a[i] = bin(a[i])[2::].zfill(len(max_a))

# 行列を作る
# 興味深くないビットについては予めansに答えを足しておく
matrix = [[0] * len(max_a) for _ in range(n)]
ans = 0
for i in range(len(max_a)):
    if xor_sum[i] == "1":
        ans += 2 ** (len(max_a) - i - 1)
    else:
        for j in range(n):
            matrix[j][i] = int(a[j][i])

# ジョルダン標準形を求める
matrix = gauss_jordan(matrix, False)

# xorを取る
tmp = 0
for i in range(n):
    tmp ^= int("".join(map(str, matrix[i])), 2)

# tmpは赤玉、青玉ともに値を持つので2倍して足す
ans = ans + 2*tmp

print(ans)

# Optimized solution
def xor_gauss_jordan(A):
    """掃き出し法でジョルダン標準形を求める"""
    cnt_row = len(A)
    cnt_col = len(bin(max(A))[2::])

    rank = 0
    for col in range(cnt_col):
        # ピボットを探す
        pivot = -1
        for row in range(rank, cnt_row):
            if A[row] & 2**(cnt_col - col - 1):
                pivot = row
                break

        #  ピボットがない場合は次の列に
        if pivot == -1:
            continue

        # 行をスワップする
        A[pivot], A[rank] = A[rank], A[pivot]

        # ピボットのある列の値がすべて0になるように掃き出す
        A_rank = A[rank]
        for row in range(cnt_row):
            if row != rank and A[row] & 2**(cnt_col - col - 1):
                A[row] ^= A[rank]
        rank += 1

    return A


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

# 全てのxorを計算

# 全てのaを2進数に変換
max_a = max(a)
max_a = bin(max_a)[2::]
len_max_a = len(max_a)

# 全てのxorを計算
# xor_sumが1のビットは興味深くない
# 興味深くないビットについては予めansに答えを足して、ビットを0にしておく
ans = 0
xor_sum = 0
for i in range(n):
    xor_sum ^= a[i]
for i in range(len_max_a):
    mask = 2**i
    tmp = mask & xor_sum
    if tmp:
        ans += tmp
        for i in range(n):
            a[i] -= tmp & a[i]

# ジョルダン標準形
a = xor_gauss_jordan(a)

tmp = 0
for i in range(n):
    tmp ^= a[i]
print((ans + 2*tmp))
# Original solution
a,b=list(map(int,input().split()));print((a+b//2))

# Optimized solution
x,y=list(map(int,input().split()))
print((x+y//2))
# Original solution
import sys
input = sys.stdin.readline

x,y = list(map(int, input().split()))
print((x+y//2))


# Optimized solution
x, y = list(map(int, input().split()))
print((x+y//2))
# Original solution
def main():
    from sys import stdin
    r = stdin.readline()[:-1]
    #r = stdin.readlines()

    x, y = list(map(int, r.split()))
    print((x+y//2))
   
if __name__ == '__main__':
    main()



# Optimized solution
def main():
    x,y = list(map(int,input().split()))
    print((x+y//2))

if __name__ == '__main__':
    main()
# Original solution
from sys import stderr, setrecursionlimit
from functools import reduce
from operator import add
setrecursionlimit(2147483647)
def f(): return [int(i) for i in input().split()]
def yes(n): print(("Yes" if n else "No"))
def debug(*x, sep=" ", end="\n"):
    for item in x:
        stderr.write(str(item))
        stderr.write(sep)
    stderr.write(end)

x, y = f()
print((x+y//2))

# Optimized solution
print((sum([x[1]//2**x[0] for x in enumerate([int(i)for i in input().split()])])))
# Original solution
X,Y= list(map(int,input().split()))
print((int(X+Y/2)))

# Optimized solution
# ABC 113

X,Y= list(map(int,input().split()))
print((int(X+Y/2)))
# Original solution
xy = list(map(int,input().split()))
# xのみを取り出す
x=xy[0]
# yのみを取り出す
y=xy[1]
print((int(x+y/2)))

# Optimized solution
a,b = list(map(int,input().split()))
print((int(a+(b/2))))
# Original solution
x, y = list(map(int, input().split()))
print((int(x + y / 2)))

# Optimized solution
a,b=list(map(int,input().split()))
print((int(a+b/2)))
# Original solution
x, y = list(map(int, input().split()))
print((x + y // 2))

# Optimized solution
def main():
    X, Y = list(map(int, input().split()))
    print((X + (Y >> 1)))


if __name__ == '__main__':
    main()
# Original solution
x,y=list(map(int,input().split()))
print((x+y//2))

# Optimized solution
X, Y = list(map(int, input().split()))
print((X+Y//2))
# Original solution
import itertools
import math
import fractions
import functools
import copy

x, y = list(map(int, input().split()))
print((x+y//2))

# Optimized solution
def main():
    # n = int(input())
    x, y = list(map(int, input().split()))
    # a = list(map(int, input().split()))
    # s = input()
    print((x+y//2))


if __name__ == '__main__':
    main()
# Original solution
x,y = list(map(int,input().split()))
print((x+y//2))


# Optimized solution
a,b = list(map(int,input().split()))
print((a+b//2))
# Original solution
X,Y = list(map(int,input().split()))
print((int(X+(Y/2))))

# Optimized solution
x,y = list(map(int,input().split()))
print((x+y//2))
# Original solution
a, b = list(map(int, input().split()))
print((a+b//2))

# Optimized solution
print((eval(input().replace(" ","+")+"//2")))
# Original solution
a,b=list(map(int,input().split()))
print((int(a+b/2)))


# Optimized solution
a,b=list(map(int,input().split()))
print((a+b//2))
# Original solution
N,M=list(map(int,input().split()))
a=[]
for i in range(N):
    a.append(list(map(int,input().split())))
mod=998244353

B=[]
for i in range(M):
    b=0
    for j in range(N):
        b+=a[j][i]*2**j
    B.append(b)

base=[]
for i in range(M):
    t=B[i]
    for b in base:
        t=min(t,t^b)
    if t!=0:
        base.append(t)

res=M-len(base)
ans=pow(2,N-1,mod)*(pow(2,M,mod)-pow(2,res,mod))
print((ans%mod))


# Optimized solution
N,M=list(map(int,input().split()));mod=998244353;base=[]
for i in range(N):
    A=input().split();s=sum(int(A[j])*2**j for j in range(M))
    for b in base:s=min(s,s^b)
    if s!=0:base.append(s)
res=N-len(base);print(((pow(2,N+M-1,mod)-pow(2,M-1+res,mod))%mod))
# Original solution
n=int(eval(input()))
l=list()
if n<=5:
  print("Yes")
  exit()
for i in range(2, n//2+1):
    if n % i == 0: 
        if (n//i,i) not in l:
            l.append((i,n//i))
flag=0
for i in l:
    if i[0]<=9 and i[1]<=9:
        flag=1
        print("Yes")
        exit()
if not flag:
    print("No")


# Optimized solution
n=int(eval(input()))
l=list()
flag=0
for i in range(1, 10):
    if n % i == 0: 
        if (n//i)<=9:
            flag+=1

if flag>0:
    print("Yes")
else:
    print("No")
# Original solution
import sys
from pprint import pprint

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

if __name__ == '__main__':
    n = int(sys.stdin.readline().strip())
    solve(n)

# Optimized solution
import sys

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

print("No")
# Original solution
N = int(eval(input()))

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

print("No")

# Optimized solution
N = int(eval(input()))

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

print("No")
# Original solution
n = int(eval(input()))
nn_list = []
for i1 in range(1,10):
  for i2 in range(1,10):
    nn_list.append(i1 * i2)
if n in nn_list:
  print('Yes')
else:
  print('No')


# Optimized solution
N = int(eval(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')
# Original solution
a = int(eval(input()))
 
b = 0
for i in range(1, 10):
    for j in range(1, 10):
        if a == i*j:
            b = 1
            break
    if b:
        break
 
if b:
    print("Yes")
else:
    print("No")

# Optimized solution
N = int(eval(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")
# Original solution
import sys
#input = sys.stdin.readline
from collections import Counter

def main():
    n =  int(eval(input( )))
    for i in range(1,10):
        for j in range(1,10):
            if n == i * j:
                print('Yes')
                exit()
    else:
        print('No')

if __name__ == '__main__':
    main()


# Optimized solution

import sys

def main():
    n = int(eval(input()))

    for i1 in range(1, 10):
        for i2 in range(1,10):
            if n == i1 * i2:
                print('Yes')
                sys.exit()
    else:
        print('No')

if __name__ == '__main__':
    main()
# Original solution
import sys
n = int(eval(input()))
for i in range(9):
    if n/(i+1) in (1,2,3,4,5,6,7,8,9):
        print('Yes')
        sys.exit()
print('No')

# Optimized solution
n=int(eval(input()))
ans='No'
for i in range(1,10):
    for j in range(1,10):
        if i*j==n:
            ans='Yes'
            break
print(ans)
# Original solution
import sys
import math
import bisect
 
 
sys.setrecursionlimit(1000000000)
def input():
    return sys.stdin.readline().strip()
 
def iinput():
    return int(eval(input()))
 
def finput():
    return float(eval(input()))
 
def tinput():
    return input().split()
 
def rinput():
    return list(map(int, tinput()))
 
def rlinput():
    return list(rinput())
 
def modst(a, s):
    res = 1
    while s:
        if s % 2:
            res *= a
        a *= a
        s //= 2
    return res

 
def main():
    n = iinput()
    for i in range(1, 10):
        for o in range(1, 10):
            if o * i == n:
                print("Yes")
                return 0
    print("No")
main()

# Optimized solution
possible = False
a = int(eval(input()))
for m in range(1, 10):
    if a % m == 0 and a / m < 10:
        print("Yes")
        possible = True
        break
if not possible:
    print("No")
# Original solution
n=int(eval(input()))
for i in range(10):
    for j in range(10):
        if i*j==n:
            print('Yes')
            exit()
print('No')

# Optimized solution
n=int(eval(input()))
for i in range(1,10):
  for j in range(1,10):
    if i*j==n:
      print('Yes')
      exit()
print('No')
# Original solution
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

N = I()

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

print('No')

# Optimized solution
import sys

def I(): return int(sys.stdin.readline().rstrip())

N = I()

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

print('No')
# Original solution
n=int(eval(input()))
for i in range(1,10):
    for j in range(1,10):
        if n==i*j:
            print("Yes")
            exit()
print("No")


# Optimized solution
n=int(eval(input()))
for i in range(1,10):
    for j in range(1,i+1):
        if n==i*j:
            print("Yes")
            exit()
print("No")
# Original solution
n=int(eval(input()))
for i in range(1,10):
    for j in range(1,i+1):
        if n==i*j:
            print("Yes")
            exit()
print("No")

# Optimized solution
n=int(eval(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"))
# Original solution
N = int(eval(input()))
mylist = []
for i in range(1,10):
    for j in range(1,10):
        if (i*j) == N:
            print("Yes")
            exit(0)

print("No")    


# Optimized solution
N = int(eval(input()))
mylist = []
for i in range(1,10):
    for j in range(1,10):
        mylist.append(i*j)
if mylist.count(N):
    print("Yes")
else:
    print("No")
# Original solution
from sys import exit

N = int(eval(input()))

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

# Optimized solution
import sys

N = int(eval(input()))

for i in range(1, 10):
    for j in range(1, 10):
        if N == i * j:
            print('Yes')
            exit()
print('No')
# Original solution
n = int(eval(input()))
for i in range(9):
  for j in range(9):
    if (i+1)*(j+1) == n:
      print('Yes')
      exit()
print('No')

# Optimized solution
n = int(eval(input()))
for i in range(1, 10):
  for j in range(1, 10):
    if i*j == n:
      print('Yes')
      exit()
print('No')
# Original solution
def b81(N):
    for i in range(1,10):
        for j in range(1,10):
            if i*j == N:
                return "Yes"
    return "No"


if __name__ == "__main__":
    N = int(eval(input()))
    print((b81(N)))

# Optimized solution
def b81_re(N):
    if N>81:
        return 'No'
    for i in reversed(list(range(1,10))):
        if N%i == 0:
            if N/i<=9:
                return 'Yes'
    return 'No'


if __name__ == "__main__":
    N = int(eval(input()))
    print((b81_re(N)))
# Original solution
import sys
n = int(eval(input()))

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

# Optimized solution
n = int(eval(input()))

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

print('No')
# Original solution
N = int(eval(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')


# Optimized solution
N = int(eval(input()))

for x in range(1, 10):
    if N%x == 0:
        y = N//x
        if 1 <= y <= 9:
            print('Yes')
            break
else:
    print('No')
# Original solution
n = int(eval(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)))

# Optimized solution
n = int(eval(input()))
s = set([x for x in [x for x in range(1, 10)] if n % x == 0 and n / x < 10])
print(("No" if len(s) == 0 else "Yes"))
# Original solution
n=int(eval(input()))
for a in range(1,10):
  for b in range(1,10):
    if n==a*b:
      print("Yes")
      exit()
    
print("No")


# Optimized solution
n=int(eval(input()))
for a in range(1,10):
  for b in  range(1,10):
    if n==a*b:
      print("Yes")
      exit()
else:
  print("No")
# Original solution
N = int(eval(input()))

answer = "No"

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

print(answer)

# Optimized solution
N = int(eval(input()))

answer = "No"

for i in range(1, 10):
  should_break = False
  for j in range(1, 10):
    if(i * j == N):
      answer = "Yes"
      break

  if(should_break):
    break

print(answer)
# Original solution
N = int(eval(input()))
count =0
t = True
for i in range(1, 10):
    if  N % i == 0:
        A = N/i
        if 1 <= A <= 9:
            while(t): 
                for a in range(1, 10):
                    if a != i :
                        if A % a == 0:
                            print('Yes')
                            count += 1
                            t = False
                            break
                    break
if  count != 1:
    print('No')

# Optimized solution
a = int(eval(input()))
for i in range(1, 10):
    for j in range(1, 10):
        if i*j == a:
            print("Yes")
            exit()
print("No")
# Original solution
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    s=set()
    for i in range(1,10):
        for j in range(1,10):
            s.add(i*j)
    n=int(eval(input()))
    print(("Yes" if n in s else "No"))
resolve()

# Optimized solution
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    n=int(eval(input()))
    for a in range(1,10):
        q,r=divmod(n,a)
        if(r==0 and 1<=q<=9):
            print("Yes")
            return
    print("No")
resolve()
# Original solution
n = int(eval(input()))
flag = True
for i in range(10):
    for j in range(10):
        kuku = i * j
        if n == kuku:
            print("Yes")
            flag = False
            break
    else:
        continue  # yes がみつからずにｊのループが終了したとき次のiループにcontinue
    break  # yesが見つかったらbreakでｊのループ抜け出す。そのあとこのbreakでiのループも抜け出す

if flag:
    print("No")

# Optimized solution
n = int(eval(input()))
flag = False
for i in range(1, 10):
    for j in range(1, 10):
        if i*j == n:
            flag = True

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