#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll INF=1LL<<60; typedef pair P; typedef pair PP; const ll MOD=998244353; const double PI=acos(-1); ll mod_pow(ll x,ll y,ll mod){ ll res=1; while(y>0){ if(y&1){ res*=x; res%=mod; } x*=x; x%=mod; y/=2; } return res; } int main(){ ll N,M; cin>>N>>M; vector A(N); for(int i=0;i>A[i]; } vector> d(M+1); for(int i=0;i ans(M+1,0); for(int m=M;m>=1;m--){ ans[m]=mod_pow(2,d[m].size(),MOD)-1;//空集合を除いた ans[m]+=MOD; ans[m]%=MOD; } /* for(int m=1;m<=M;m++){ cout<<"ans["<=1;m--){ for(int t=2*m;t<=M;t+=m){ ans[m]-=ans[t]; ans[m]+=MOD; ans[m]%=MOD; } } for(int m=1;m<=M;m++){ cout<