#include #include #include using namespace std; typedef long long LL; const int maxn=65536; int p[maxn],v[maxn],ph[maxn],cnt; LL n,res; inline int phi(int x) { LL res=x; for(LL i=2;i*i<=x;i++) if(x%i==0) { res=res/i*(i-1); while(x%i==0) x/=i; } if(x>1) res=res/x*(x-1); return res; } int main() { #ifdef local freopen("pro.in","r",stdin); #endif /* ph[1]=1; for(int i=2;i