#include #include #include #include #include #include #include #include #include #include using namespace std; struct UnionFind { vector par; vector siz; UnionFind(long long N) : par(N), siz(N) { for(long long i = 0; i < N; i++){ par[i] = i; siz[i] = 1; } } long long root(long long x) { if (par[x] == x) return x; return par[x] = root(par[x]); } long long unite(long long x, long long y) { long long rx = root(x); long long ry = root(y); if (rx == ry) return rx; if (siz[rx] > siz[ry]) swap(rx, ry); par[rx] = ry; siz[ry] += siz[rx]; return ry; } bool same(long long x, long long y) { long long rx = root(x); long long ry = root(y); return rx == ry; } long long size(long long x){ return siz[root(x)]; } }; int main(){ long long N; long double mx=0; cin >> N; if (N == 0){ cout << 1 << endl; return 0; } vector X(N), Y(N); UnionFind tree(N); for (int i=0; i> X[i] >> Y[i]; auto d = [&](int i, int j){return (X[i]-X[j])*(X[i]-X[j]) + (Y[i]-Y[j])*(Y[i]-Y[j]);}; for (int i=0; i