#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> N >> K; vector A(N); for(i=0;i> A[i]; A[i]%=K; } sort(A.begin(),A.end()); ll x=1; for(i=0;i