#include using namespace std; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a rs,ps; UnionFind(){} UnionFind(int n):num(n),rs(n,1),ps(n,0){iota(ps.begin(),ps.end(),0);} int find(int x){ return (x==ps[x]?x:ps[x]=find(ps[x])); } bool same(int x,int y){ return find(x)==find(y); } void unite(int x,int y){ x=find(x);y=find(y); if(x==y) return; if(rs[x]>l>>r; UnionFind uf(r+1); for(int i=l;i<=r;i++) for(int j=i;j<=r;j+=i) uf.unite(i,j); cout<