#include using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))< ostream& operator<<(ostream& o, const pair &p){o<<"("< ostream& operator<<(ostream& o, const vector &v){o<<"[";for(T t:v){o<=0) return dp[n]; vector v; for(int i=1; i<=k; ++i){ int r = n-i; if(r<0) break; ++ct[g(r,k)]; } int ret = 0; while(ct[ret]!=0) ++ret; for(int i=1; i<=k; ++i){ int r = n-i; if(r<0) break; --ct[g(r,k)]; } return dp[n] = ret; } int main(){ int n,k; cin >>n >>k; memset(dp,-1,sizeof(dp)); int x = 0; rep(i,n){ int a; cin >>a; x ^= g(a,k); } cout << (x==0?"NO":"YES") << endl; return 0; }