#include <bits/stdc++.h>
using namespace std;
int n;
pair<long long, long long> a[100006];
vector<pair<long long, long long> > v;
long long premax[100006], premin[100006], suffmax[100006], suffmin[100006];
inline bool compare(pair<long long, long long> uu,
                    pair<long long, long long> vv) {
  return uu.second < vv.second;
}
inline bool check(long long mid) {
  int flag = 0;
  int t = n - 1, tt = n - 1;
  for (int i = n - 1; i >= 0; i--) {
    if (a[i].second == a[i + 1].second) {
      continue;
    }
    long long mx = suffmax[i + 1];
    long long mn = suffmin[i + 1];
    if (mx != -1000000000 && mn != 1000000000)
      if (((mx * mx) + (a[i].second * a[i].second) > mid) ||
          ((mn * mn) + (a[i].second * a[i].second) > mid)) {
        continue;
      }
    if (mx != -1000000000 && mn != 1000000000)
      if (((mx - mn) * (mx - mn)) > mid) {
        continue;
      }
    for (; t >= 0; t--) {
      if (t <= i) {
        long long z = (a[t].second - a[i].second) * (a[t].second - a[i].second);
        if (z > mid) {
          break;
        }
      }
    }
    long long p = a[t + 1].second;
    if (t >= 0) {
      mx = max(mx, premax[t]);
      mn = min(mn, premin[t]);
    }
    if (mx != -1000000000 && mn != 1000000000)
      if (((mx - mn) * (mx - mn)) > mid) {
        continue;
      }
    if (mx != -1000000000 && mn != 1000000000)
      if (((mx * mx) + (a[i].second * a[i].second) > mid) ||
          ((mn * mn) + (a[i].second * a[i].second) > mid)) {
        continue;
      }
    if (mx != -1000000000 && mn != 1000000000)
      if ((max(abs(mx), abs(mn)) * max(abs(mx), abs(mn)) + (p * p)) <= mid) {
        flag = 1;
        break;
      }
    if (mx == -1000000000 && mn == 1000000000) {
      flag = 1;
      break;
    }
    p = max(abs(mx), abs(mn));
    for (; tt >= 0; tt--) {
      if (tt <= i) {
        long long z = (p * p) + (a[tt].second * a[tt].second);
        if (z > mid) {
          break;
        }
      }
    }
    p = a[tt + 1].second;
    if (tt >= 0) {
      mx = max(mx, premax[tt]);
      mn = min(mn, premin[tt]);
    }
    if (((mx - mn) * (mx - mn)) > mid) {
      continue;
    }
    if (((mx * mx) + (a[i].second * a[i].second) > mid) ||
        ((mn * mn) + (a[i].second * a[i].second) > mid)) {
      continue;
    }
    if (((p * p) + max(abs(mx), abs(mn)) * max(abs(mx), abs(mn))) > mid) {
      continue;
    }
    flag = 1;
    break;
  }
  if (((premax[n - 1] - premin[n - 1]) * (premax[n - 1] - premin[n - 1])) <=
      mid) {
    flag = 1;
  }
  if (flag) {
    return true;
  }
  return false;
}
inline long long answer() {
  sort(a, a + n, compare);
  premax[0] = premin[0] = a[0].first;
  for (int i = 1; i < n; i++) {
    premax[i] = max(premax[i - 1], a[i].first);
    premin[i] = min(premin[i - 1], a[i].first);
  }
  suffmax[n] = -1000000000;
  suffmin[n] = 1000000000;
  suffmin[n - 1] = suffmax[n - 1] = a[n - 1].first;
  for (int i = n - 2; i >= 0; i--) {
    suffmax[i] = max(suffmax[i + 1], a[i].first);
    suffmin[i] = min(suffmin[i + 1], a[i].first);
  }
  long long low = 0, high = 100000000000000000;
  while (low < high) {
    long long mid = low + ((high - low) / 2ll);
    if (check(mid)) {
      high = mid;
    } else {
      low = mid + 1;
    }
  }
  return low;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  a[n].first = 0;
  a[n].second = 10000000000;
  sort(a, a + n, compare);
  long long ans = answer();
  for (int i = 0; i < n; i++) {
    swap(a[i].first, a[i].second);
  }
  sort(a, a + n, compare);
  ans = min(ans, answer());
  cout << ans << "\n";
}
