Today Pari and Arya are playing a game called Remainders.

Pari chooses two positive integer x and k, and tells Arya k but not x. Arya have to find the value $x \text{mod} k$. There are n ancient numbers c_1, c_2, ..., c_{n} and Pari has to tell Arya $x \operatorname{mod} c_{i}$ if Arya wants. Given k and the ancient values, tell us if Arya has a winning strategy independent of value of x or not. Formally, is it true that Arya can understand the value $x \text{mod} k$ for any positive integer x?

Note, that $x \text{mod} y$ means the remainder of x after dividing it by y.


-----Input-----

The first line of the input contains two integers n and k (1 ≤ n,  k ≤ 1 000 000) — the number of ancient integers and value k that is chosen by Pari.

The second line contains n integers c_1, c_2, ..., c_{n} (1 ≤ c_{i} ≤ 1 000 000).


-----Output-----

Print "Yes" (without quotes) if Arya has a winning strategy independent of value of x, or "No" (without quotes) otherwise.


-----Examples-----
Input
4 5
2 3 5 12

Output
Yes

Input
2 7
2 3

Output
No



-----Note-----

In the first sample, Arya can understand $x \operatorname{mod} 5$ because 5 is one of the ancient numbers.

In the second sample, Arya can't be sure what $x \text{mod} 7$ is. For example 1 and 7 have the same remainders after dividing by 2 and 3, but they differ in remainders after dividing by 7.

Difficulty: competition

Starter code:

Solutions:
from math import *
from sys import *
n, k = map(int, stdin.readline().split(" "))
a = 1;
for c in map(int, stdin.readline().split(" ")):
  a = a * (gcd(k, c)//gcd(a, c))
if a%k == 0:
  print("Yes")
else:
  print("No")

import math
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
g = 1
for i in a:
    g = math.gcd(k, i * g//math.gcd(i, g))
if g == k:
    print('Yes')
else:
    print('No')


def sieze_prime(n):
    sieze = [True]*(n+1)
    sieze[0] = sieze[1] = False
    i = 2
    while i * i <= n:
        if sieze[i]:
            for j in range(2*i, n+1, i):
                sieze[j] = False
            # end for
        # end if
        i = i + 1
    # end while
    primes = range(0, n+1)
    primes = filter(lambda x : sieze[x], primes)
    return primes
# end def

def factorize(n):
    nonlocal primes
    factors = []
    i = 0;
    while primes[i]**2 <= n:
        p = primes[i]
        if n % p == 0:
            factor = [primes[i], 1]
            n //= p
            while n % p == 0:
                n //= p
                factor[1] += 1
            # end while
            factors.append(factor)
        # end if
        i += 1
    # end while
    if not n==1: factors.append([n, 1])
    return factors
# end def

primes = None

def gcd(a, b):
    if a % b == 0:
        return b
    return gcd(b, a % b)

def lcm(a, b):
    return (a * b) // gcd(a, b)


def main():
    nonlocal primes
    primes = list(sieze_prime(1000000))
    n, k = map(lambda x : int(x), input().split())
    c = set(map(lambda x : int(x), input().split()))
    factors = factorize(k)
    success = True
    for prime, power in factors:
        factor = prime**power
        if any(map(lambda x : int(x) % factor==0, c)):
            continue
        else:
            success = False
            break
    if success: print("Yes")
    else: print("No")

main()

from math import gcd


def lcm(a, b):
	return (a * b) // gcd(a, b)


def main():
	n, k = list(map(int, input().split()))
	ans = 1
	a = list(map(int, input().split()))
	for i in range(n):
		tc = a[i]
		gc = gcd(tc, k)
		ans = lcm(ans, gc)
	if ans == k:
		print('Yes')
	else:
		print('No')
main()


import math
n, k = list(map(int, input().split()))
a = 1;
ar = list(map(int, input().split()))
for c in ar:
	a *=  math.gcd(k,c) //math.gcd(a, c)
if a % k == 0:
	print("Yes")
else:
	print("No")



import sys
input=sys.stdin.readline
import math
n, k = list(map(int, input().split()))
a = 1;
ar = list(map(int, input().split()))
for c in ar:
    a *=  math.gcd(k,c)//math.gcd(a,c) 
    #print(a,c)
if a % k == 0:
	print("Yes")
else:
	print("No")



import sys
input=sys.stdin.readline
import math
n, k = list(map(int, input().split()))
a = 1;
ar = list(map(int, input().split()))
for c in ar:
    a *=  math.gcd(k,c)//math.gcd(a,c) 
    #print(a,c)
if a==k:
	print("Yes")
else:
	print("No")


import sys
import math
n,k = list(map(int,sys.stdin.readline().split()))
arr = list(map(int,sys.stdin.readline().split()))
ans = 1
for i in arr:
    ans = math.gcd(k,i*ans//math.gcd(i,ans))
if ans == k:
    print('Yes')
else:
    print('No')




# https://codeforces.com/problemset/problem/687/B
MAX = 1000000
n,k = map(int,input().split())
ancient = [int(x) for x in input().split()]

isPrime = [0 for x in range(MAX+1)]
count = [0 for x in range(MAX+1)]

for x in range(2,MAX+1):
    if not isPrime[x]:
        for y in range(x,MAX+1,x):
            isPrime[y] = x

for val in ancient:
    while val > 1:
        p = isPrime[val]
        c = 0
        while val%p == 0:
            c+=1
            val = val//p
        count[p] = max(count[p],c)

flag = True 
while k > 1:
    flag &= (count[isPrime[k]] > 0)
    count[isPrime[k]] -= 1
    k = k//isPrime[k]
print("Yes" if flag else "No")

# *********************************************************************
# *-------------------------------------------------------------------*
# *                                                                   *
# *   Life is just a life. Lead it, Feel it & Enjoy It Properly.      *
# *   Nothing is impossible. Just believe in yourself & Almighty.     *
# *                                                                   *
# *-------------------------------------------------------------------*
# *********************************************************************
import math

def LCM(a,b):
    return int(a/math.gcd(a,b))*b

def DenTofieM():
    n, k = list(map(int,input().split()))
    ar = list(map(int,input().split()))

    L=1
    for i in ar:
        G=math.gcd(i,k)
        L=LCM(L,G)
    if L==k: print("Yes")
    else: print("No")

DenTofieM()


# *********************************************************************
# *-------------------------------------------------------------------*
# *                                                                   *
# *   Life is just a life. Lead it, Feel it & Enjoy It Properly.      *
# *   Nothing is impossible. Just believe in yourself & Almighty.     *
# *                                                                   *
# *-------------------------------------------------------------------*
# *********************************************************************
import math

def LCM(a,b):
    return int(a/math.gcd(a,b))*b

def DenTofieM():
    n, k = list(map(int,input().split()))
    ar = list(map(int,input().split()))

    L=1
    for i in ar:
        G=math.gcd(i,k)
        L=LCM(L,G)
    if L==k: print("Yes")
    else: print("No")

DenTofieM()



import sys
from functools  import reduce
from math import gcd
I=sys.stdin.readline

ans=""

n,k=map(int,I().split())

c=list(map(int,I().split()))


i=0
x=1
while i<n:
	g=gcd(c[i],k)
	x=(x*g)//gcd(g,x)
	i+=1




if x==k:
	ans+="Yes\n"
else:
	ans+="No\n"


print(ans)

from math import gcd
def lcm(x,y):
	return x*y//gcd(x,y)
n,k=map(int,input().split())
lst=[]
kk=k
i=2
while i<=kk:
	c=0
	while kk%i==0:
		c+=1
		kk//=i
	if c:
		lst.append([i,c])
	i+=1
arr=list(map(int,input().split()))
flag=True
for j in lst:
	ma=0
	for i in range(n):
		c=0
		while arr[i]%j[0]==0:
			c+=1
			arr[i]//=j[0]
		ma=max(c,ma)
	if ma<j[1]:
		flag=False
		break
print("Yes") if flag else print("No")

# from math import gcd
# def lcm(x,y):
# 	return x*y//gcd(x,y)
# n,k=map(int,input().split())
# lst=[]
# kk=k
# i=2
# while i<=kk:
# 	c=0
# 	while kk%i==0:
# 		c+=1
# 		kk//=i
# 	if c:
# 		lst.append([i,c])
# 	i+=1
# arr=list(map(int,input().split()))
# flag=True
# for j in lst:
# 	ma=0
# 	for i in range(n):
# 		c=0
# 		while arr[i]%j[0]==0:
# 			c+=1
# 			arr[i]//=j[0]
# 		ma=max(c,ma)
# 	if ma<j[1]:
# 		flag=False
# 		break
# print("Yes") if flag else print("No")

from math import gcd
def lcm(x,y):
	return x*y//gcd(x,y)
n,k=map(int,input().split())
arr=list(map(int,input().split()))
l=1
for x in arr:
	l=gcd(k,lcm(l,x))
print("Yes") if l==k else print("No")

import math
def gcd(a, b):
    if b == 0:
        return a;
    else:
        return gcd(b, a % b);

def lcm(a, b):
    return a * b // math.gcd(a, b);

def solve(n, k):
    ans = 1;
    a = list(map(int, input().split()));
    #print(a);
    for i in range(n):
        ans = math.gcd(k, lcm(ans, a[i]));
    return ans == k;

while True:
    try:
        n, k = list(map(int, input().split()));
        p = solve(n, k);
        if p:
            print("Yes");
        else:
            print("No");
    except EOFError:
        break


from math import gcd
n, k = list(map(int, input().split()))
ans = 1
for e in input().split():
  e = int(e)
  ans = ans // gcd(ans, e) * e % k
print('No' if ans else 'Yes')



def gcd(x, y): 
  
   while(y): 
       x, y = y, x % y 
  
   return x 

n, k = list(map(int, input().split()))
l = list(map(int, input().split()))

lcm = 1

for v in l:
    lcm = lcm * v // gcd(lcm, v)
    lcm = gcd(lcm, k)

if k == lcm:
    print('Yes')
else:
    print('No')


import sys
from math import gcd
input = sys.stdin.readline
n, k = map(int, input().split())
v = list(map(int, input().split()))
lcm = 1
for u in v:
    lcm = lcm * u // gcd(u, lcm)
    lcm = gcd(lcm, k)
print (["No", "Yes"][lcm == k])

import math

def main():
    n,k = list(map(int,input().split()))
    C = list(map(int,input().split()))
    l=C[0]
    for c in C:
        l = l*c//math.gcd(l,c)%k
        if(l==0):
            print("Yes")
            return
    print("No")

main()


import sys, math
input = sys.stdin.readline

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

def getInt():
    return int(input())

def getStrs():
    return [s for s in input().split()]

def getStr():
    return input().strip()

def listStr():
    return list(input().strip())

import collections as col
import math

def solve():
    #we need to know whether, amongst the C values, there are two or more pairwise coprime values whose product equals K
    N, K = getInts()
    C = getInts()
    lcm = 1
    for c in C:
        lcm = lcm*c//math.gcd(lcm,c)
        lcm = math.gcd(lcm,K)
    return "Yes" if lcm == K else "No"
    
#for _ in range(getInt()):
print(solve())