#include using std::cout; using std::endl; using std::cin; int main(){ int n, k; cin >> n >> k; long ans = 0; for(int i = 0; i < n; i++){ int a; cin >> a; if(!a) continue; ans ^= (a - 1) % k; } if(ans) cout << "YES" << endl; else cout << "NO" << endl; return 0; }