#include #include namespace my{ using namespace std; #define eb emplace_back #define LL(...) ll __VA_ARGS__;lin(__VA_ARGS__) #define FO(n) for(ll ij=n;ij--;) #define FOR(i,...) for(auto[i,i##stop,i##step]=range(0,__VA_ARGS__);i=i##stop;i-=i##step) #define fe(a,i,...) for(auto&&__VA_OPT__([)i __VA_OPT__(,__VA_ARGS__]):a) #define single_testcase void solve();}int main(){my::io();my::solve();}namespace my{ void io(){cin.tie(nullptr)->sync_with_stdio(0);cout<concept vectorial=is_base_of_v,V>; templateistream&operator>>(istream&i,vector&v){fe(v,e)i>>e;return i;} templateostream&operator<<(ostream&o,const vector&v){fe(v,e)o<?nl:sp);return o;} templatestruct vec:vector{ using vector::vector; vec(const vector&v){vector::operator=(v);} vec&operator^=(const vec&u){this->insert(this->end(),u.begin(),u.end());return*this;} vec operator^(const vec&u)const{return vec{*this}^=u;} vec&operator++(){fe(*this,e)++e;return*this;} vec&operator--(){fe(*this,e)--e;return*this;} }; void lin(auto&...a){(cin>>...>>a);} templatevoid pp(const auto&...a){ll n=sizeof...(a);((cout<0,c)),...);cout<prime_enumerate(ll n){ vecsieve(n/3+1,1); for(ll p=5,d=4,i=1,rn=sqrt_floor(n);p<=rn;p+=d=6-d,i++){ if(!sieve[i])continue; for(ll q=(p*p)/3,r=d*p/3+(d*p%3==2),s=p*2;q<(ll)sieve.size();q+=r=s-r)sieve[q]=0; } vecr{2,3}; for(ll p=5,d=4,i=1;p<=n;p+=d=6-d,i++)if(sieve[i])r.eb(p); while(r.size()&&r.back()>n)r.pop_back(); return r; } single_testcase void solve(){ LL(L,R); vecv(R-L+1); fo(X,L,R+1)v[X-L]=X; vecis_squarefree(R-L+1,1); fe(prime_enumerate(cbrt_floor(R)),p){ fo(X,ceil(L,p)*p,R+1,p){ if((X/p)%p==0)is_squarefree[X-L]=0; else v[X-L]/=p; } } fo(X,L,R+1){ if(!is_squarefree[X-L])continue; ll t=v[X-L]; if(t==1)continue; if(square(sqrt_floor(t))==t)is_squarefree[X-L]=0; } ll ans=0; fo(X,L,R+1)ans+=is_squarefree[X-L]; pp(ans); }}