#include #include #include #include #include using namespace std; typedef long long LL; LL distance2(vector >& p, int p1, int p2){ LL dx = p[p1].first - p[p2].first; LL dy = p[p1].second - p[p2].second; return dx*dx + dy*dy; } int main(){ int N; cin >> N; vector > p(N); for(int i = 0; i < N; i++){ cin >> p[i].first >> p[i].second; } priority_queue, vector >, greater > > q; q.push(pair(0, 0)); LL max_dist = 0; vector memo(N); while(!q.empty()){ LL w = q.top().first; int pos = q.top().second; q.pop(); max_dist = max(max_dist, w); if(pos == N-1) break; if(memo[pos]) continue; memo[pos] = 1; for(int i = 0; i < N; i++){ LL dist2 = distance2(p, pos, i); q.push(pair(dist2, i)); } } LL ans = LL(sqrt(max_dist)) / 10 * 10; while(ans*ans < max_dist) ans += 10; cout << ans << endl; return 0; }