#include <bits/stdc++.h>
using namespace std;
const int N = 200200;
const int mod = 1e9 + 7;
const long long llinf = (long long)(1e18);
long long mipref[N], mapref[N], misuff[N], masuff[N];
pair<long long, long long> p[N];
long long ans = llinf;
long long n;
inline bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.second < b.second || a.second == b.second && a.first < b.first)
    return 1;
  return 0;
}
long long dist(long long a, long long b) { return (a) * (a) + (b) * (b); }
inline int check(long long d) {
  for (int i = 1; i <= n; ++i) {
    if (i == 1)
      mipref[i] = mapref[i] = p[i].second;
    else
      mipref[i] = min(mipref[i - 1], p[i].second),
      mapref[i] = max(mapref[i - 1], p[i].second);
  }
  for (int i = n; i >= 1; --i) {
    if (i == n)
      masuff[i] = misuff[i] = p[i].second;
    else
      masuff[i] = max(masuff[i + 1], p[i].second),
      misuff[i] = min(misuff[i + 1], p[i].second);
  }
  int l = 1;
  long long res3 = llinf;
  for (int i = 1; i <= n; ++i) {
    while (l <= n &&
           (p[l].first - p[i].first) * (p[l].first - p[i].first) <= d) {
      if (i == 1 && l == n) {
        ans = min(ans, res3);
        ans = min(ans, (p[l].first - p[i].first) * (p[l].first - p[i].first));
        return 1;
      }
      long long miny = min(misuff[l + 1], mipref[i - 1]);
      long long maxy = max(masuff[l + 1], mapref[i - 1]);
      long long res = (maxy - miny) * (maxy - miny);
      res = max(res, (p[l].first - p[i].first) * (p[l].first - p[i].first));
      res = max(res, dist(p[l].first, maxy));
      res = max(res, dist(p[i].first, maxy));
      res = max(res, dist(p[l].first, miny));
      res = max(res, dist(p[i].first, miny));
      res3 = min(res3, res);
      ++l;
    }
  }
  ans = min(ans, res3);
  return res3 <= d;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> p[i].first >> p[i].second;
  sort(p + 1, p + n + 1);
  long long l = -1, r = (long long)(1e18);
  while (l + 1 < r) {
    long long m = l + r >> 1;
    if (check(m))
      r = m;
    else
      l = m;
  }
  ans = min(ans, r);
  for (int i = 1; i <= (int)n; ++i) swap(p[i].first, p[i].second);
  sort(p + 1, p + n + 1);
  l = -1, r = ans + 1;
  while (l + 1 < r) {
    long long m = l + r >> 1;
    if (check(m))
      r = m;
    else
      l = m;
  }
  ans = min(ans, r);
  cout << ans;
  return 0;
}
