//ssenseeeeeeeeeeeeeeeeeeeeeeeeeeeee
#include<bits/stdc++.h>
#define startt ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
typedef unsigned long long ull;
typedef long long ll;
#define MOD 1000000007
#define MX 1000000000
#define MXL 1000000000000000000
#define PI 3.14159265
#define pb push_back
using namespace std;
#define sc second
#define endl '\n'
#define fr first
int primes[26] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};
int main(){
startt
map<int, int> mp;
int n, k;
cin >> n >> k;
int a[n+1];
for(int i = 0; i < n; i++)
{
cin >> a[i];
}
if(k%2 == 0)
{
cout << "NO" << endl;
return 0;
}
for(int i = 0; i < n; i++)
{
for(int j = 0; j < 25; j++)
{
if(a[i]%primes[j] == 0)
{
mp[j]++;
}
}
}
for(int i = 0; i < 25; i++)
{
if(mp[i] >= n-1)
{
cout << "YES" << endl;
return 0;
}
}
cout << "NO" << endl;
}
Ly9zc2Vuc2VlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlCiNpbmNsdWRlPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgc3RhcnR0IGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpO2Npbi50aWUoMCk7Y291dC50aWUoMCk7CnR5cGVkZWYgdW5zaWduZWQgbG9uZyBsb25nIHVsbDsKdHlwZWRlZiBsb25nIGxvbmcgIGxsOwojZGVmaW5lIE1PRCAxMDAwMDAwMDA3CiNkZWZpbmUgTVggMTAwMDAwMDAwMAojZGVmaW5lIE1YTCAxMDAwMDAwMDAwMDAwMDAwMDAwCiNkZWZpbmUgUEkgMy4xNDE1OTI2NQojZGVmaW5lIHBiIHB1c2hfYmFjawp1c2luZyBuYW1lc3BhY2Ugc3RkOwojZGVmaW5lIHNjIHNlY29uZAojZGVmaW5lIGVuZGwgJ1xuJwojZGVmaW5lIGZyIGZpcnN0CgppbnQgcHJpbWVzWzI2XSA9IHsyLCAzLCA1LCA3LCAxMSwgMTMsIDE3LCAxOSwgMjMsIDI5LCAzMSwgMzcsIDQxLCA0MywgNDcsIDUzLCA1OSwgNjEsIDY3LCA3MSwgNzMsIDc5LCA4MywgODksIDk3fTsKCmludCBtYWluKCl7CiAgICBzdGFydHQKICAgIG1hcDxpbnQsIGludD4gbXA7CiAgICBpbnQgbiwgazsKICAgIGNpbiA+PiBuID4+IGs7CiAgICBpbnQgYVtuKzFdOwogICAgZm9yKGludCBpID0gMDsgaSA8IG47IGkrKykKICAgIHsKICAgICAgICBjaW4gPj4gYVtpXTsKICAgIH0KICAgIGlmKGslMiA9PSAwKQogICAgewogICAgICAgIGNvdXQgPDwgIk5PIiA8PCBlbmRsOwogICAgICAgIHJldHVybiAwOwogICAgfQogICAgZm9yKGludCBpID0gMDsgaSA8IG47IGkrKykKICAgIHsKICAgICAgICBmb3IoaW50IGogPSAwOyBqIDwgMjU7IGorKykKICAgICAgICB7CiAgICAgICAgICAgIGlmKGFbaV0lcHJpbWVzW2pdID09IDApCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIG1wW2pdKys7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBmb3IoaW50IGkgPSAwOyBpIDwgMjU7IGkrKykKICAgIHsKICAgICAgICBpZihtcFtpXSA+PSBuLTEpCiAgICAgICAgewogICAgICAgICAgICBjb3V0IDw8ICJZRVMiIDw8IGVuZGw7CiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0KICAgIH0KICAgIGNvdXQgPDwgIk5PIiA8PCBlbmRsOwp9Cg==