#include using namespace std; #define ll long long const int maxn=1000010; int P[maxn],mu[maxn],cnt; bool vis[maxn]; void init(){ mu[1]=1; for(int i=2;i>t; while(t--){ ll n;cin>>n; ll ans=0; for(int d=1;1ll*d*d<=n;d++){ if(!mu[d])continue; ll sum=0; ll m=n/d/d; for(ll i=1,j;i<=m;i=j+1){ j=m/(m/i); sum=(sum+(m/i)%mod*(j%mod*((j+1)%mod)%mod*inv2%mod-i%mod*((i-1)%mod)%mod*inv2%mod)%mod)%mod; } ans=(ans+(d*mu[d]*sum%mod+mod))%mod; } cout<