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.

Source: codeforces | Difficulty: MEDIUM_HARD
Tags: Number theory

Mathematics


Solutions:
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')


import math

def gcd_iter(u, v):
	while v:
		(u, v) = (v, u % v)
	return u
(n, k) = map(int, input().split())
array = set(map(int, input().split()))
p = 1
slozh = False
delit = math.floor(math.sqrt(k + 1))
if k % 2 == 0:
	slozh = True
else:
	for i in range(3, delit + 1, 2):
		if k % i == 0:
			slozh = True
			break
if not slozh:
	if k > max(array):
		print('NO')
		exit()
for i in array:
	p = p // gcd_iter(p, i) * i
	p = gcd_iter(p, k)
	if p == k:
		print('YES')
		exit()
print('NO')


import sys
ints = (int(x) for x in sys.stdin.read().split())

def sieve(N):
	n = int(N ** 0.5 + 100)
	is_prime = [1] * n
	primes = []
	div = [i for i in range(n)]
	for i in (i for i in range(2, n) if is_prime[i]):
		for j in range(i * i, n, i):
			is_prime[j] = 0
			div[j] = i
		div[i] = i
		primes.append(i)
	return (primes, div)
from collections import Counter
from itertools import takewhile

def decompose(x, primes, div):
	divs = []
	push = lambda p: divs.append(p) or x // p
	for p in takewhile(lambda p: x >= len(div), primes):
		while x % p == 0:
			x = push(p)
	if x >= len(div):
		x = push(x)
	while x > 1:
		x = push(div[x])
	return Counter(divs)
(primes, div) = sieve(10 ** 9)
(n, k) = (next(ints), next(ints))
k = set((a ** b for (a, b) in decompose(k, primes, div).items()))
c = set((next(ints) for i in range(n)))
print('YES' if all((any((x % y == 0 for x in c)) for y in k)) else 'NO')


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 sys
input = sys.stdin.readline
import math
(n, k) = 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:
	print('Yes')
else:
	print('No')


from math import gcd
(n, k) = 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')


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


import math
from typing import List

def PrimesDiv(n):
	primes_list = []
	cant = 0
	while n % 2 == 0:
		cant += 1
		n = n / 2
	if cant:
		primes_list.append([2, cant])
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		cant = 0
		while n % i == 0:
			cant += 1
			n = n / i
		if cant:
			primes_list.append([i, cant])
	if n > 2:
		primes_list.append([n, 1])
	return primes_list

def IsContain(num, list):
	for element in list:
		if element % num == 0:
			return True
	return False

def Answer(k, input_list):
	primes_list = PrimesDiv(k)
	for (prime, count) in primes_list:
		bool = IsContain(prime ** count, input_list)
		if not bool:
			return False
	return True

def RemaindersGame():
	(_, k) = input().split()
	k = int(k)
	anciest = list(map(lambda x: int(x), input().split()))
	bool = Answer(k, anciest)
	if bool:
		print('Yes')
	else:
		print('No')
RemaindersGame()


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


import sys
input = sys.stdin.buffer.readline
from math import gcd

def prog():
	(n, k) = map(int, input().split())
	nums = list(map(int, input().split()))
	max_powers = 1
	for num in nums:
		max_powers = gcd(k, num * max_powers // gcd(num, max_powers))
	if max_powers == k:
		print('YES')
	else:
		print('NO')
prog()


import os
import sys
from io import BytesIO, IOBase

def main():
	maxn = 10 ** 6
	maxn += 5
	(n, k) = list(map(int, input().split()))
	arr = list(map(int, input().split()))
	prime = [0 for i in range(maxn + 2)]
	freq = [0 for i in range(maxn + 2)]
	flag = 0
	for i in range(2, maxn):
		if prime[i] == 0:
			for j in range(i, maxn, i):
				prime[j] = i
	for i in arr:
		num = i
		while num > 1:
			pr = prime[num]
			cnt = 0
			while True:
				if num % pr == 0:
					cnt += 1
					num = num // pr
				else:
					break
			freq[pr] = max(freq[pr], cnt)
	while k > 1:
		pr = prime[k]
		if freq[pr] > 0:
			freq[pr] -= 1
			k = k // pr
		else:
			k = k // pr
			flag = 1
			break
	if flag == 0:
		print('Yes')
	else:
		print('No')
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')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
input = sys.stdin.readline
from math import gcd

def lcm(a, b):
	return a * b // gcd(a, b)
(n, k) = map(int, input().split())
c = list(map(int, input().split()))
l = c[0]
for i in range(1, n):
	l = lcm(l, c[i]) % k
if l % k == 0:
	print('Yes')
else:
	print('No')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
import heapq
from math import gcd, factorial, floor, ceil
from copy import deepcopy
from collections import deque
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
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):
	(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))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 10 ** 9 + 7

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for pp in range(t):
		solve(pp)

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def google(p):
	print('Case #' + str(p) + ': ', end='')

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

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
limit = 1000001
sieve = [1] * limit
sieve[0] = 0
sieve[1] = 0
for i in range(2, limit // 2 + 1):
	if sieve[i] == 1:
		for j in range(2 * i, limit, i):
			sieve[j] = 0
primes = []
for i in range(2, limit):
	if sieve[i] == 1:
		primes.append(i)
(n, k) = map(int, inp().split())
arr = lis()
flag = 0
factors = []
d = 2
index = 0
if k == 1:
	print('Yes')
	exit(0)
while k > 1 and d * d <= k:
	tempk = 0
	while k % d == 0:
		tempk += 1
		k = k // d
	if tempk > 0:
		factors.append(d ** tempk)
	d += 1
if k > 1:
	factors.append(k)
flag = 0
for i in factors:
	flag = 0
	for j in arr:
		if j % i == 0:
			flag = 1
			break
	if flag == 0:
		break
if flag == 0:
	print('No')
else:
	print('Yes')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

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):
	(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))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def pow(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

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

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def lcm(a, b):
	return a * b // gcd(a, b)
from collections import defaultdict

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24

def N():
	return int(inp())

def solve():
	(n, k) = sep()
	ar = set(lis())
	p = 1
	for i in ar:
		p = lcm(i, p) % k
	if p == 0:
		print('Yes')
	else:
		print('No')
solve()


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


from math import sqrt

def factor(n):
	potentional_p = 3
	itog_list = {}
	if n % 2 == 0:
		itog_list[2] = 0
	while n % 2 == 0:
		n = n // 2
		itog_list[2] += 1
	while n - 1:
		if potentional_p > sqrt(n):
			if n in itog_list:
				itog_list[n] += 1
			else:
				itog_list[n] = 1
			return itog_list
		while n % potentional_p == 0:
			n = n // potentional_p
			if potentional_p in itog_list:
				itog_list[potentional_p] += 1
			else:
				itog_list[potentional_p] = 1
		potentional_p += 2
	return itog_list
(n, k) = map(int, input().split())
C = list(map(int, input().split()))
z = factor(k)
z2 = {}
for i in z:
	z2[i] = 0
for i in C:
	for d in z2:
		if z2[d] < z[d]:
			y = 0
			x = i
			while x % d == 0:
				y += 1
				x //= d
			z2[d] = max(z2[d], y)
for d in z:
	if z[d] > z2[d]:
		print('No')
		exit(0)
print('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')


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
		i = i + 1
	primes = range(0, n + 1)
	primes = filter(lambda x: sieze[x], primes)
	return primes

def factorize(n):
	global 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
			factors.append(factor)
		i += 1
	if not n == 1:
		factors.append([n, 1])
	return factors
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():
	global 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()


import math
a = input().split(' ')
n = int(a[0])
k = int(a[1])
t = True

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
C = set(map(int, input().split()))
Composite = False
a = math.floor(math.sqrt(k + 1))
if k % 2 == 0:
	Composite = True
else:
	for i in range(3, a + 1, 2):
		if k % i == 0:
			Composite = True
			break
if not Composite:
	if k > max(C):
		print('NO')
	else:
		A = set()
		z = True
		for i in C:
			if i in A:
				pass
			if i % k == 0:
				z = False
				print('YES')
				break
			else:
				A.add(i)
		if z:
			print('NO')
else:
	A = set()
	m = 1
	for i in C:
		if i in A:
			pass
		else:
			A.add(i)
			m *= i / gcd(m, i)
			m %= k
			if m == 0:
				t = False
				print('YES')
				break
	if t:
		print('NO')


from math import *
(n, k) = map(int, input().split())
arr = list(map(int, input().split()))
flag = 0
if k == 1:
	print('Yes')
else:
	arr1 = []
	temp = k
	for i in range(2, k + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp = temp // i
			arr1.append(i ** cnt)
	mainflag = 0
	for j in arr1:
		flag = 0
		for i in range(n):
			if arr[i] % j == 0:
				flag = 1
				break
		if flag == 0:
			mainflag = 1
			break
	if mainflag == 1:
		print('No')
	else:
		print('Yes')


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 prime_factors(n):
	factors = []
	num = 0
	while n % 2 == 0:
		num += 1
		n //= 2
	if num:
		factors.append((2, num))
	i = 3
	while n > 1 and i * i <= n:
		num = 0
		while n % i == 0:
			num += 1
			n //= i
		if num:
			factors.append((i, num))
		i += 2
	if n > 2:
		factors.append((n, 1))
	return factors

def fails(num, C):
	for c in C:
		if c % num == 0:
			return False
	return True

def solve():
	(N, K) = getInts()
	C = set(getInts())
	K_facs = prime_factors(K)
	for (k0, k1) in K_facs:
		if fails(k0 ** k1, C):
			return 'No'
	return 'Yes'
print(solve())


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():
	(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'
print(solve())


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


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 sys
from math import gcd, sqrt, ceil, log2
from collections import defaultdict, Counter, deque
from bisect import bisect_left, bisect_right
import math
sys.setrecursionlimit(2 * 10 ** 5 + 10)
import heapq
from itertools import permutations
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192
aa = 'abcdefghijklmnopqrstuvwxyz'

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')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def get_sum(bit, i):
	s = 0
	i += 1
	while i > 0:
		s += bit[i]
		i -= i & -i
	return s

def update(bit, n, i, v):
	i += 1
	while i <= n:
		bit[i] += v
		i += i & -i

def modInverse(b, m):
	g = math.gcd(b, m)
	if g != 1:
		return -1
	else:
		return pow(b, m - 2, m)

def primeFactors(n):
	sa = []
	while n % 2 == 0:
		sa.append(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			sa.append(i)
			n = n // i
	if n > 2:
		sa.append(n)
	return sa

def seive(n):
	pri = [True] * (n + 1)
	p = 2
	while p * p <= n:
		if pri[p] == True:
			for i in range(p * p, n + 1, p):
				pri[i] = False
		p += 1
	return pri

def check_prim(n):
	if n < 0:
		return False
	for i in range(2, int(sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True

def getZarr(string, z):
	n = len(string)
	(l, r, k) = (0, 0, 0)
	for i in range(1, n):
		if i > r:
			(l, r) = (i, i)
			while r < n and string[r - l] == string[r]:
				r += 1
			z[i] = r - l
			r -= 1
		else:
			k = i - l
			if z[k] < r - i + 1:
				z[i] = z[k]
			else:
				l = i
				while r < n and string[r - l] == string[r]:
					r += 1
				z[i] = r - l
				r -= 1

def search(text, pattern):
	concat = pattern + '$' + text
	l = len(concat)
	z = [0] * l
	getZarr(concat, z)
	ha = []
	for i in range(l):
		if z[i] == len(pattern):
			ha.append(i - len(pattern) - 1)
	return ha

def mergeIntervals(arr):
	arr.sort(key=lambda x: x[0])
	m = []
	s = -10000
	max = -100000
	for i in range(len(arr)):
		a = arr[i]
		if a[0] > max:
			if i != 0:
				m.append([s, max])
			max = a[1]
			s = a[0]
		elif a[1] >= max:
			max = a[1]
	if max != -100000 and [s, max] not in m:
		m.append([s, max])
	return m

class SortedList:

	def __init__(self, iterable=[], _load=200):
		values = sorted(iterable)
		self._len = _len = len(values)
		self._load = _load
		self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
		self._list_lens = [len(_list) for _list in _lists]
		self._mins = [_list[0] for _list in _lists]
		self._fen_tree = []
		self._rebuild = True

	def _fen_build(self):
		self._fen_tree[:] = self._list_lens
		_fen_tree = self._fen_tree
		for i in range(len(_fen_tree)):
			if i | i + 1 < len(_fen_tree):
				_fen_tree[i | i + 1] += _fen_tree[i]
		self._rebuild = False

	def _fen_update(self, index, value):
		if not self._rebuild:
			_fen_tree = self._fen_tree
			while index < len(_fen_tree):
				_fen_tree[index] += value
				index |= index + 1

	def _fen_query(self, end):
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		x = 0
		while end:
			x += _fen_tree[end - 1]
			end &= end - 1
		return x

	def _fen_findkth(self, k):
		_list_lens = self._list_lens
		if k < _list_lens[0]:
			return (0, k)
		if k >= self._len - _list_lens[-1]:
			return (len(_list_lens) - 1, k + _list_lens[-1] - self._len)
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		idx = -1
		for d in reversed(range(len(_fen_tree).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
				idx = right_idx
				k -= _fen_tree[idx]
		return (idx + 1, k)

	def _delete(self, pos, idx):
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len -= 1
		self._fen_update(pos, -1)
		del _lists[pos][idx]
		_list_lens[pos] -= 1
		if _list_lens[pos]:
			_mins[pos] = _lists[pos][0]
		else:
			del _lists[pos]
			del _list_lens[pos]
			del _mins[pos]
			self._rebuild = True

	def _loc_left(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(lo, pos) = (-1, len(_lists) - 1)
		while lo + 1 < pos:
			mi = lo + pos >> 1
			if value <= _mins[mi]:
				pos = mi
			else:
				lo = mi
		if pos and value <= _lists[pos - 1][-1]:
			pos -= 1
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value <= _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def _loc_right(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(pos, hi) = (0, len(_lists))
		while pos + 1 < hi:
			mi = pos + hi >> 1
			if value < _mins[mi]:
				hi = mi
			else:
				pos = mi
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value < _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def add(self, value):
		_load = self._load
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len += 1
		if _lists:
			(pos, idx) = self._loc_right(value)
			self._fen_update(pos, 1)
			_list = _lists[pos]
			_list.insert(idx, value)
			_list_lens[pos] += 1
			_mins[pos] = _list[0]
			if _load + _load < len(_list):
				_lists.insert(pos + 1, _list[_load:])
				_list_lens.insert(pos + 1, len(_list) - _load)
				_mins.insert(pos + 1, _list[_load])
				_list_lens[pos] = _load
				del _list[_load:]
				self._rebuild = True
		else:
			_lists.append([value])
			_mins.append(value)
			_list_lens.append(1)
			self._rebuild = True

	def discard(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_right(value)
			if idx and _lists[pos][idx - 1] == value:
				self._delete(pos, idx - 1)

	def remove(self, value):
		_len = self._len
		self.discard(value)
		if _len == self._len:
			raise ValueError('{0!r} not in list'.format(value))

	def pop(self, index=-1):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		value = self._lists[pos][idx]
		self._delete(pos, idx)
		return value

	def bisect_left(self, value):
		(pos, idx) = self._loc_left(value)
		return self._fen_query(pos) + idx

	def bisect_right(self, value):
		(pos, idx) = self._loc_right(value)
		return self._fen_query(pos) + idx

	def count(self, value):
		return self.bisect_right(value) - self.bisect_left(value)

	def __len__(self):
		return self._len

	def __getitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		return self._lists[pos][idx]

	def __delitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		self._delete(pos, idx)

	def __contains__(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_left(value)
			return idx < len(_lists[pos]) and _lists[pos][idx] == value
		return False

	def __iter__(self):
		return (value for _list in self._lists for value in _list)

	def __reversed__(self):
		return (value for _list in reversed(self._lists) for value in reversed(_list))

	def __repr__(self):
		return 'SortedList({0})'.format(list(self))

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def sol(n):
	seti = set()
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			seti.add(n // i)
			seti.add(i)
	return seti

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

def moore_voting(l):
	count1 = 0
	count2 = 0
	first = 10 ** 18
	second = 10 ** 18
	n = len(l)
	for i in range(n):
		if l[i] == first:
			count1 += 1
		elif l[i] == second:
			count2 += 1
		elif count1 == 0:
			count1 += 1
			first = l[i]
		elif count2 == 0:
			count2 += 1
			second = l[i]
		else:
			count1 -= 1
			count2 -= 1
	for i in range(n):
		if l[i] == first:
			count1 += 1
		elif l[i] == second:
			count2 += 1
	if count1 > n // 3:
		return first
	if count2 > n // 3:
		return second
	return -1

def find_parent(u, parent):
	if u != parent[u]:
		parent[u] = find_parent(parent[u], parent)
	return parent[u]

def dis_union(n):
	par = [i for i in range(n + 1)]
	rank = [1] * (n + 1)
	k = int(input())
	for i in range(k):
		(a, b) = map(int, input().split())
		(z1, z2) = (find_parent(a, par), find_parent(b, par))
		if z1 != z2:
			par[z1] = z2
			rank[z2] += rank[z1]

def dijkstra(n, tot, hash):
	hea = [[0, n]]
	dis = [10 ** 18] * (tot + 1)
	dis[n] = 0
	boo = defaultdict(bool)
	check = defaultdict(int)
	while hea:
		(a, b) = heapq.heappop(hea)
		if boo[b]:
			continue
		boo[b] = True
		for (i, w) in hash[b]:
			if b == 1:
				c = 0
				if (1, i, w) in nodes:
					c = nodes[1, i, w]
					del nodes[1, i, w]
				if dis[b] + w < dis[i]:
					dis[i] = dis[b] + w
					check[i] = c
				elif dis[b] + w == dis[i] and c == 0:
					dis[i] = dis[b] + w
					check[i] = c
			elif dis[b] + w <= dis[i]:
				dis[i] = dis[b] + w
				check[i] = check[b]
			heapq.heappush(hea, [dis[i], i])
	return check

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res *= x
		x = x * x
		y = y >> 1
	return res
(n, k) = map(int, input().split())
l = list(map(int, input().split()))
lc = 1
g = 0
for i in range(n):
	lc = lcm(lc, gcd(l[i], k))
if lc == k:
	print('Yes')
else:
	print('No')


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)


import math
(n, k) = 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')


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


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


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
(n, k) = map(int, input().split())
c = list(map(int, input().split()))
pr = []
x = k
for d in range(2, x + 1):
	if d * d > x:
		break
	if x % d == 0:
		pr.append(d)
		while x % d == 0:
			x //= d
if x > 1:
	pr.append(x)
f = {p: 0 for p in pr}
for x in c:
	for p in pr:
		e = 0
		while x % p == 0:
			x //= p
			e += 1
		f[p] = max(f[p], e)
ans = 'Yes'
for (p, e) in f.items():
	for j in range(e):
		if k % p == 0:
			k //= p
	if k % p == 0:
		ans = 'No'
print(ans)


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