#include using namespace std; using Int = long long; const char newl = '\n'; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a void drop(const T &x){cout< vector read(size_t n){ vector ts(n); for(size_t i=0;i>ts[i]; return ts; } template struct Mint{ inline static constexpr T mod = MOD; T v; Mint():v(0){} Mint(signed v):v(v){} Mint(long long t){v=t%MOD;if(v<0) v+=MOD;} Mint pow(long long k){ Mint res(1),tmp(v); while(k){ if(k&1) res*=tmp; tmp*=tmp; k>>=1; } return res; } static Mint add_identity(){return Mint(0);} static Mint mul_identity(){return Mint(1);} Mint inv(){return pow(MOD-2);} Mint& operator+=(Mint a){v+=a.v;if(v>=MOD)v-=MOD;return *this;} Mint& operator-=(Mint a){v+=MOD-a.v;if(v>=MOD)v-=MOD;return *this;} Mint& operator*=(Mint a){v=1LL*v*a.v%MOD;return *this;} Mint& operator/=(Mint a){return (*this)*=a.inv();} Mint operator+(Mint a) const{return Mint(v)+=a;} Mint operator-(Mint a) const{return Mint(v)-=a;} Mint operator*(Mint a) const{return Mint(v)*=a;} Mint operator/(Mint a) const{return Mint(v)/=a;} Mint operator+() const{return *this;} Mint operator-() const{return v?Mint(MOD-v):Mint(v);} bool operator==(const Mint a)const{return v==a.v;} bool operator!=(const Mint a)const{return v!=a.v;} static Mint comb(long long n,Int k){ Mint num(1),dom(1); for(Int i=0;i ostream& operator<<(ostream &os,Mint m){os< void divisor_transform(std::vector &a, F f) { int n = a.size(); std::vector sieve(n, true); for (int p = 2; p < n; ++p) { if (sieve[p]) { for (int k = 1; k * p < n; ++k) { sieve[k * p] = false; f(a[k], a[k * p]); } } } } template void inverse_divisor_transform(std::vector &a, F f) { int n = a.size(); std::vector sieve(n, true); for (int p = 2; p < n; ++p) { if (sieve[p]) { for (int k = (n - 1) / p; k != 0; --k) { sieve[k * p] = false; f(a[k], a[k * p]); } } } } //INSERT ABOVE HERE signed main(){ cin.tie(0); ios::sync_with_stdio(0); for(Int i=2;i>n; sign[1]=1; for(Int i=2;i<=n;i++){ if(sq[i]) continue; sign[i]=-sign[i/pr[i]]; } using M = Mint; vector way(MAX,0),emp(MAX,0); M all{0}; M cnt{0}; for(Int i=1;i<=n;i++){ //cout< dp0(MAX,0),dp1(MAX,0),dp2(MAX,0); for(Int i=1;i