#include using namespace std; const int MAX=5000000; bool isp[MAX+1]; int ok; int f(int X) { int ret=0; while(X) { ret|=1<>N; for(int i=0;i>a;ok|=1<