#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x, y;
} point[100010];
int n;
int maxn[100010][2];
int minn[100010][2];
bool cmp1(Point a, Point b) { return a.x < b.x; }
long long solve() {
  long long st = 0, ed = (long long)200000000 * (long long)200000000;
  long long mid;
  long long maxx, minx;
  while (st <= ed) {
    mid = (st + ed) >> 1;
    bool ok = false;
    for (int i = 1, j = 1; j <= n; j++) {
      while ((long long)(point[j].x - point[i].x) *
                 (long long)(point[j].x - point[i].x) >
             mid)
        i++;
      maxx = max(maxn[i - 1][0], maxn[j + 1][1]);
      minx = min(minn[i - 1][0], minn[j + 1][1]);
      if (minx > maxx) {
        ok = true;
        break;
      }
      if ((maxx - minx) * (maxx - minx) > mid) continue;
      if ((long long)point[i].x * (long long)point[i].x + minx * minx > mid)
        continue;
      if ((long long)point[j].x * (long long)point[j].x + maxx * maxx > mid)
        continue;
      if ((long long)point[i].x * (long long)point[i].x + maxx * maxx > mid)
        continue;
      if ((long long)point[j].x * (long long)point[j].x + minx * minx > mid)
        continue;
      ok = true;
      break;
    }
    if (ok)
      ed = mid - 1;
    else
      st = mid + 1;
  }
  return st;
}
int main() {
  while (cin >> n) {
    int tempx, tempy;
    for (int i = 1; i <= n; i++) scanf("%d%d", &point[i].x, &point[i].y);
    sort(point + 1, point + n + 1, cmp1);
    maxn[0][0] = -INT_MAX;
    maxn[n + 1][1] = -INT_MAX;
    minn[0][0] = INT_MAX;
    minn[n + 1][1] = INT_MAX;
    for (int i = 1; i <= n; i++) {
      maxn[i][0] = max(maxn[i - 1][0], point[i].y);
      maxn[n + 1 - i][1] = max(maxn[n + 2 - i][1], point[n + 1 - i].y);
      minn[i][0] = min(minn[i - 1][0], point[i].y);
      minn[n + 1 - i][1] = min(minn[n + 2 - i][1], point[n + 1 - i].y);
    }
    long long ans = min((long long)(maxn[n][0] - minn[n][0]) *
                            (long long)(maxn[n][0] - minn[n][0]),
                        (long long)(point[n].x - point[1].x) *
                            (long long)(point[n].x - point[1].x));
    ans = min(ans, solve());
    for (int i = 1; i <= n; i++) {
      int temp = point[i].x;
      point[i].x = point[i].y;
      point[i].y = temp;
    }
    sort(point + 1, point + n + 1, cmp1);
    maxn[0][0] = -INT_MAX;
    maxn[n + 1][1] = -INT_MAX;
    minn[0][0] = INT_MAX;
    minn[n + 1][1] = INT_MAX;
    for (int i = 1; i <= n; i++) {
      maxn[i][0] = max(maxn[i - 1][0], point[i].y);
      maxn[n + 1 - i][1] = max(maxn[n + 2 - i][1], point[n + 1 - i].y);
      minn[i][0] = min(minn[i - 1][0], point[i].y);
      minn[n + 1 - i][1] = min(minn[n + 2 - i][1], point[n + 1 - i].y);
    }
    ans = min(ans, solve());
    cout << ans << endl;
  }
  return 0;
}
