#include using namespace std; using i64 = int64_t; using vi = vector; using vvi = vector; vi par; int find(int x) { if (x == par[x]) return x; return par[x] = find(par[x]); } bool unite(int x, int y) { x = find(x); y = find(y); if (x == y) return true; par[x] = y; return false; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.setf(ios::fixed); cout.precision(10); int n; cin >> n; vi xs(n), ys(n); for (int i = 0; i < n; i++) { cin >> xs[i] >> ys[i]; } par = vi(n); iota(par.begin(), par.end(), 0); for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { i64 d = i64(xs[i] - xs[j]) * (xs[i] - xs[j]) + i64(ys[i] - ys[j]) * (ys[i] - ys[j]); if (d <= 10 * 10) { unite(i, j); } } } map parXmin, parXmax, parYmin, parYmax; for (int i = 0; i < n; i++) { int p = par[i]; if (parXmin.count(p) == 0) { parXmin[p] = xs[i]; parXmax[p] = xs[i]; parYmin[p] = ys[i]; parYmax[p] = ys[i]; } else { parXmin[p] = min(parXmin[p], xs[i]); parXmax[p] = max(parXmax[p], xs[i]); parYmin[p] = min(parYmin[p], ys[i]); parYmax[p] = max(parYmax[p], ys[i]); } } double ans = 1; for (auto& p: parXmin) { ans = max(ans, hypot(parXmax[p.first] - parXmin[p.first], parYmax[p.first] - parYmin[p.first]) + 2); } cout << ans << endl; }