#include #include #include #include #include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; typedef unsigned long long ull; typedef pairP; ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a%b); } ll lcm(ll a, ll b) { ll g = gcd(a, b); return a / g * b; } const ll mod = 1000000007; const ll INF = 1 << 30; const ll INF2 = 9000000000000000000LL; bool fl = true; int dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 }; string abc = "abcdefghijklmnopqrstuvwxyz"; struct edge { ll to, cost; }; struct edge1 { ll from, to, cost; }; double pai = 3.141592653589793; int main() { ll n, k, a[1000010], sum = 0, x = 0; cin >> n >> k; for (int i = 0;i < n;i++) { cin >> a[i]; if (n == 1) { if (a[i] <= k) { cout << "YES" << endl; exit(0); } } sum += a[i]; a[i] %= k; } if (k == 1) { if (sum % 2 == 0)cout << "NO" << endl; else cout << "YES" << endl; } else { int count = 0, ite = 0; for (int i = 0;i < n;i++) { if (a[i] != 0) { count++; ite = i; } } if (count != 1) { for (int i = 0;i < n;i++) { if (a[i] == 0)continue; x ^= a[i]; } if (x != 0 && x != 1)cout << "YES" << endl; else cout << "NO" << endl; } else { if (a[ite] != 1)cout << "YES" << endl; else cout << "NO" << endl; } } }