#include<iostream> #include<vector> #include<algorithm> #include<cmath> #define ll long long usingnamespacestd;
int n;
ll root(ll x){ ll l = 0, r = 1000000000, mid, ans; while (l <= r) { mid = l + r >> 1; if (mid * mid <= x) ans = mid, l = mid + 1; else r = mid - 1; } return ans; }
vector<ll> A; voidinit(ll n){ for (ll i = 2; i * i <= n / i; ++i) { ll t = i * i; while (t <= n / i) { t *= i; ll s = root(t); if (s * s != t) A.push_back(t); } } sort(A.begin(), A.end()); A.erase(unique(A.begin(), A.end()), A.end()); }