#include #include #include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll n,l; cin>>n>>l; vector d(n); for(int i = 0;i>d[i]; vector b(2*n,0); for(int i = 0;i<2*n;i++) cin>>b[i]; vector dif(2*n,0); auto get = [&](int i){ if(i now(2*n,0); for(int i = 0;i0){ go(i,dif[i]); }else{ go(i+n,-dif[i]); } } for(int i = 0;i<2*n;i++){ now[i] = b[i] - now[i]; } sort(now.begin(),now.end()); now.erase(unique(now.begin(),now.end()),now.end()); if(now.size()==1&&now[0]%l==0){ cout<<"Yes\n"; return 0; } cout<<"No\n"; return 0; }