#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; #define REP(var, a, b) for (int var = (a); var < (b); var++) #define rep(var, n) for (int var = 0; var < (n); ++var) #define ALL(c) (c).begin(), (c).end() #define rALL(c) (c).rbegin(), (c).rend() ll MOD = 1000000007; ll INF = 1e18; class UnionFind { protected: vi data; public: UnionFind(int size) : data(size, -1) {} bool unite(int x, int y) { x = root(x); y = root(y); if (x != y) { if (data[y] < data[x]) { swap(x, y); } data[x] += data[y]; data[y] = x; } return x != y; } bool same(int x, int y) { return root(x) == root(y); } int root(int x) { return data[x] < 0 ? x : data[x] = root(data[x]); } int size(int x) { return -data[root(x)]; } }; int main() { // ll n; cin >> n; vl x(n), y(n); rep(i, n) { cin >> x[i] >> y[i]; } vvl d(n, vl(n)); rep(i, n) { rep(j, n) { if (i == j) continue; ll dist = (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]); d[i][j] = dist; } } ll ok = (x[n-1] - x[0]) * (x[n-1] - x[0]) + (y[n-1] - y[0]) * (y[n-1] - y[0]); ll ng = 0; while (ok - ng > 1) { ll mid = (ok + ng) / 2; UnionFind uf(n); rep(i, n) { rep(j, n) { if (i != j && d[i][j] <= mid) { uf.unite(i, j); } } } if (uf.same(0, n-1)) { ok = mid; } else { ng = mid; } } ll ans = (ll)sqrt(ok) / 10 * 10; while (ans * ans < ok) ans += 10; cout << ans << endl; return 0; }