#include using namespace std; typedef long long ll; const int MAX = 5e6+1; bool p[MAX]; void init(){ for(int i=0;i>n; init(); int ans = -1; int bit = 0; for(int i=0;i>a; bit += (1<=1) && ((bit & (1<