#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() template inline bool chmax(A &a, B b) { if (a inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; } typedef unsigned long long ull; typedef long long ll; typedef pair pii; typedef pair pll; typedef pair P; const ll INF = 1ll<<29; const ll MOD = 1000000007; const double EPS = 1e-10; int n; ll x[1000], y[1000]; ll d[1000]; int main() { cin >> n; REP(i, n) scanf("%lld %lld", x + i, y + i); fill(d, d + n, 1ll<<62); priority_queue, greater > pq; pq.push(pll(0, 0)); while (!pq.empty()) { ll now = pq.top().first; int cur = pq.top().second; pq.pop(); if (!chmin(d[cur], now)) continue; REP(i, n) if (i != cur && d[i] > now) { ll nextd = max((x[i] - x[cur]) * (x[i] - x[cur]) + (y[i] - y[cur]) * (y[i] - y[cur]), now); pq.push(pll(nextd, i)); } } if (d[n - 1] > 1000000000000ll && d[n - 1] % 100000 > 0) d[n - 1] += 100000; printf("%lld\n", (ll)ceil(sqrt(d[n - 1]) / 10) * 10); return 0; }