///Abdullah Al Mahmud ///Khulna University #include using namespace std; const unsigned int M = 1000000007; const int MOD = (int) 1e9 + 7; const int INF = (int) 1e9+21; const long long LINF = (long long) 1e18; const long double PI = 2 * acos((long double)0); typedef unsigned long long ull; typedef long long ll; typedef long double ld; typedef pair pi; typedef vector vi; typedef vector vii; typedef complex point; #define Mahmud main() #define endl "\n" ///STL #define mp make_pair #define pb push_back #define pf push_front #define fi first #define se second #define sz(x) ((int)(x).size()) #define all(x) x.begin(),x.end() ///Debug #define dbg(x) std::cerr<<"["<<__LINE__<<"]"<<#x<<"="<<(x)< void printArray(x arr[],y sizeOfArray,y from=0,y e=10) { for(y i=from; i inline ostream &operator<<(ostream &os,const pair& p) { os<<"{"< inline ostream &operator<<(ostream &os,const map& m) { for(typename map::const_iterator itr=m.begin(); itr!=m.end(); ++itr) os<fi<<"="<se< inline ostream &operator<<(ostream &os,const set& s) { for(typename set::const_iterator itr=s.begin(); itr!=s.end(); ++itr) os<<((itr==s.begin())?"":" ")<<*itr; return os; } template inline ostream &operator<<(ostream &os,const vector& s) { for(typename vector::const_iterator itr=s.begin(); itr!=s.end(); ++itr) os<<((itr==s.begin())?"":" ")<<*itr; return os; } ///STL input template inline istream &operator>>(istream& in,pair& p) { in >> p.fi >> p.se; return in; } template inline istream &operator>>(istream& in,vector& v) { if(sz(v)) for(x > : v) in>>gt; else { string s; x obj; while(s.empty()) { getline(in,s); if(!in) return in;//if empty } stringstream ss(s); while(ss>>obj) v.pb(obj); } return in; } template inline istream &operator>>(istream& in,set& v) { string s; x obj; while(s.empty()) { getline(in,s); if(!in) return in;//if empty } stringstream ss(s); while(ss>>obj) v.insert(obj); return in; } #define bitcount(n) __builtin_popcount(n) #define EPS 1e-9 ///necessary functions ll lcm(ll a,ll b) { return a/__gcd(a,b)*b; } int ton(string x) { int y; std::istringstream ss(x); ss >> y; return y; } template string tostring(T x) { ostringstream ss; ss << x ; return ss.str(); } ///Current Code vars #define MAX 100000 int n,m; string s; ///Current Code functions int prime[MAX+1]; void primme() { prime[0]=1; prime[1]=1; for(int i=2;i<=MAX;++i) { if(prime[i]==0) for(int j=i+i;j<=MAX;j += i) prime[j]=1; } } void solve() { int g; cin>>g; primme(); while(g--) { cin>>n; int c=0; for(int i=2;i<=n;++i) { // cout<