#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; typedef pair pii; typedef pair pli; const int iinf = 1 << 29; const long long linf = 1ll << 61; #define dump(x) cerr << #x << " : " << x << '\n' #define MOD(x, y) (((y) + (x) % (y)) % (y)) int N; int X[1001]; int Y[1001]; ll dist[1001][1001]; bool visit[1001]; bool C(int d) { d *= 10; fill(visit, visit + 1001, false); queue q; q.push(1); visit[1] = true; while (!q.empty()) { int v = q.front(); q.pop(); if (v == N) return true; for (int i = 1; i <= N; i++) { if (visit[i]) continue; if (dist[v][i] <= (ll)d * (ll)d) { visit[i] = true; q.push(i); } } } return false; } int main(int argc, char* argv[]) { scanf("%d", &N); for (int i = 1; i <= N; i++) { scanf("%d%d", &X[i], &Y[i]); } for (int i = 1; i <= N; i++) { for (int j = 1; j <= N; j++) { int x = X[j] - X[i]; int y = Y[j] - Y[i]; dist[i][j] = (ll)x * (ll)x + (ll)y * (ll)y; } } int l = 0, u = (int)(pow(10, 9) * pow(2, 0.5) / 10) + 1; while (l < u) { int mid = (l + u) / 2; if (C(mid)) u = mid; else l = mid + 1; } printf("%d\n", u * 10); return 0; }