#include #include #include #include #include #include #include using namespace std; typedef pair PLL; int main() { int n, x, y; vector points; cin >> n; points.assign(n, PLL()); for (int i = 0; i < n; i++) { cin >> x >> y; points[i] = make_pair(x, y); } vector< vector > length2(n, vector(n, PLL())); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { long long x = points[i].first - points[j].first; long long y = points[i].second - points[j].second; length2[i][j] = make_pair(x * x + y * y, i * 10000 + j); } } vector reach(n, false); priority_queue, greater > que; for (int i = 1; i < n; i++) { que.push(length2[0][i]); } reach[0] = true; long long ans2 = -1; while (!que.empty()) { auto val = que.top(); que.pop(); ans2 = max(ans2, val.first); int to = val.second % 10000; if (to == n - 1) { break; } else if (reach[to]) { continue; } reach[to] = true; for (int i = 0; i < n; i++) { if (!reach[i]) { que.push(length2[to][i]); } } } long long ans = sqrt(ans2); while(ans * ans < ans2) { ans++; } ans = (ans + 9) / 10 * 10; cout << ans << endl; return 0; }