// In the name of Allah the Lord of the Worlds. #include using namespace std; typedef long long ll; const int MAX = 1e6+9; bool isPrime[MAX+9]; vectorprimes; mapdp; void seive() { for(int i=0;i<=MAX;i++)isPrime[i] = true; for(int i=2;i<=MAX;i++){ if(isPrime[i]==true){ for(int j=2*i;j<=MAX;j+=i){ isPrime[j] = false; } primes.push_back(i); } } } ll f(ll n) { //if(n==1)return 1; if(dp[n]!=0)return dp[n]; vectorv; ll n_temp = n; if(n>1)v.push_back(n); int sz = primes.size(); for(int i=0;i1)v.push_back(n_temp); int si = v.size(); ll value = 0; for(int i=0;i