#include <bits/stdc++.h>
using namespace std;
int pref[100100];
int Pref[100100];
int Suf[100100];
int suf[100100];
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    v.push_back(pair<int, int>(x, y));
  }
  sort(v.begin(), v.end());
  pref[0] = Pref[0] = v[0].second;
  for (int i = 1; i < n; i++) {
    pref[i] = min(pref[i - 1], v[i].second);
    Pref[i] = max(Pref[i - 1], v[i].second);
  }
  suf[n - 1] = Suf[n - 1] = v[n - 1].second;
  for (int i = n - 2; i >= 0; i--) {
    suf[i] = min(suf[i + 1], v[i].second);
    Suf[i] = max(Suf[i + 1], v[i].second);
  }
  long long ans = ((long long)(v[n - 1].first - v[0].first) *
                   (v[n - 1].first - v[0].first));
  for (int i = 0; i < n; i++) {
    int x = v[i].first, y = v[i].second;
    long long low = 0, up = ans;
    while (low != up) {
      long long mid = (low + up) / 2;
      if (mid < ((long long)(y) * (y))) {
        low = mid + 1;
        continue;
      }
      long long u = (long long)sqrt(mid);
      while (((long long)(u) * (u)) > mid) u--;
      while (((long long)(u + 1) * (u + 1)) <= mid) u++;
      long long ymax = y, ymin = y - u;
      ymin = max(ymin, -ymax);
      if (y < 0) {
        ymin = y;
        ymax = y + u;
        ymax = min(ymax, -ymin);
      }
      long long d = u;
      u = (long long)sqrt(mid - ((long long)(y) * (y)));
      while (((long long)(u) * (u)) > mid - ((long long)(y) * (y))) u--;
      while (((long long)(u + 1) * (u + 1)) <= mid - ((long long)(y) * (y)))
        u++;
      long long xmax = u, xmin = -u;
      ;
      int ok = 1;
      if (Pref[n - 1] > ymax || pref[n - 1] < ymin) {
        int a = 0, b = n - 1;
        while (a != b) {
          int m = (a + b) / 2;
          if (Pref[m] > ymax || pref[m] < ymin)
            b = m;
          else
            a = m + 1;
        }
        int l1 = a;
        a = 0, b = n - 1;
        while (a != b) {
          int m = (a + b + 1) / 2;
          if (Suf[m] > ymax || suf[m] < ymin)
            a = m;
          else
            b = m - 1;
        }
        int l2 = a;
        if (v[l1].first < xmin || v[l2].first > xmax ||
            v[l2].first - v[l1].first > d)
          ok = 0;
      }
      if (ok)
        up = mid;
      else
        low = mid + 1;
    }
    ans = low;
  }
  for (int i = 0; i < n; i++) swap(v[i].first, v[i].second);
  sort(v.begin(), v.end());
  ans = min(ans, ((long long)(v[n - 1].first - v[0].first) *
                  (v[n - 1].first - v[0].first)));
  printf("%lld\n", ans);
}
