#include #include #include using namespace std; typedef unsigned long long ull; typedef __uint128_t val_t; val_t po(val_t x,val_t y,val_t m){ val_t z=1; for(;y;y>>=1){ if(y&1)z=z*x%m; x=x*x%m; } return z; } ull gcd(ull x,ull y){return y?gcd(y,x%y):x;} bool miller_rabin(ull n){ if(n==2)return true; if(n==1||n%2==0)return false; ull d=n-1,s=0,a=1; for(;d%2==0;d/=2)s+=1; for(int k=5;k--;){ //todo for(a++;gcd(a,n)!=1;a++); //todo ull r=po(a,d,n); if(r==1||r==n-1)continue; int t=s; for(;t;t--){ r=po(r,2,n); if(r==n-1)break; } if(!t)return false; } return true; } void solve(ull n){ if(n%2==0){puts(n>2?"Yes":"No");return;} for(ull m=2;m