#include <bits/stdc++.h>
using namespace std;
int const lim = 1e6 + 4;
vector<int> fac;
long long inf;
pair<int, int> inp[lim + 3];
int mn[lim + 3], mx[lim + 3], mn1[lim + 3], mx1[lim + 3];
int n;
bool check(long long x) {
  long long ans = x;
  int l = -1, r = -1;
  for (int i = 0; i < n; i++) {
    l = r = -1;
    int x1 = inp[i].first;
    if (x1 >= 0) {
      if (abs(inp[0].first) <= abs(x1) &&
          1ll * (x1 - inp[0].first) * (x1 - inp[0].first) <= x)
        l = -1;
      else {
        int lo = 0, hi = i - 1;
        while (lo < hi) {
          if (lo == hi - 1) {
            if (abs(inp[hi].first) <= abs(x1) &&
                1ll * (x1 - inp[hi].first) * (x1 - inp[hi].first) <= x)
              hi = lo;
            break;
          }
          int mid = (lo + hi) / 2;
          if (abs(inp[mid].first) <= abs(x1) &&
              1ll * (x1 - inp[mid].first) * (x1 - inp[mid].first) <= x)
            hi = mid - 1;
          else
            lo = mid;
        }
        l = hi;
      }
      if (i != n - 1) r = i + 1;
    } else {
      if (abs(inp[n - 1].first) <= abs(x1) &&
          1ll * (inp[n - 1].first - x1) * (inp[n - 1].first - x1) <= x)
        r = -1;
      else {
        int lo = i + 1, hi = n - 1;
        while (lo < hi) {
          if (lo == hi - 1) {
            if (abs(inp[lo].first) <= abs(x1) &&
                1ll * (inp[lo].first - x1) * (inp[lo].first - x1) <= x)
              lo = hi;
            break;
          }
          int mid = (lo + hi) / 2;
          if (abs(inp[mid].first) <= abs(x1) &&
              1ll * (inp[mid].first - x1) * (inp[mid].first - x1) <= x)
            lo = mid + 1;
          else
            hi = mid;
        }
        r = lo;
      }
      if (i != 0) l = i - 1;
    }
    if (l != -1) {
      if (1ll * abs(mn[l]) * abs(mn[l]) > ans - (1ll * abs(x1) * abs(x1)))
        continue;
      if (1ll * abs(mx[l]) * abs(mx[l]) > ans - (1ll * abs(x1) * abs(x1)))
        continue;
    }
    if (r != -1) {
      if (1ll * abs(mn1[r]) * abs(mn1[r]) > ans - (1ll * abs(x1) * abs(x1)))
        continue;
      if (1ll * abs(mx1[r]) * abs(mx1[r]) > ans - (1ll * abs(x1) * abs(x1)))
        continue;
    }
    int mn_y = 0, mx_y = 0;
    if (r == -1) {
      if (l != -1) mn_y = mn[l], mx_y = mx[l];
    } else if (l == -1) {
      if (r != -1) mn_y = mn1[r], mx_y = mx1[r];
    } else
      mn_y = min(mn[l], mn1[r]), mx_y = max(mx[l], mx1[r]);
    if (1ll * abs(mx_y - mn_y) * abs(mx_y - mn_y) > ans) continue;
    return true;
  }
  return false;
}
int main() {
  cin >> n;
  int mn_y = INT_MAX, mx_y = -INT_MAX;
  int mn_x = INT_MAX, mx_x = -INT_MAX;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &inp[i].first, &inp[i].second);
    mn_y = min(mn_y, inp[i].second);
    mx_y = max(mx_y, inp[i].second);
  }
  sort(inp, inp + n);
  mn[0] = mx[0] = inp[0].second;
  for (int i = 1; i < n; i++)
    mn[i] = min(inp[i].second, mn[i - 1]),
    mx[i] = max(inp[i].second, mx[i - 1]);
  mn1[n - 1] = mx1[n - 1] = inp[n - 1].second;
  for (int i = n - 2; i >= 0; i--)
    mn1[i] = min(inp[i].second, mn1[i + 1]),
    mx1[i] = max(inp[i].second, mx1[i + 1]);
  check(28900);
  long long lo = 0, hi = min(1ll * 200000003 * 200000003,
                             1ll * (mx_y - mn_y) * (mx_y - mn_y));
  while (lo < hi) {
    if (lo == hi - 1) {
      if (check(lo)) hi = lo;
      break;
    }
    long long mid = (lo + hi) / 2;
    if (check(mid))
      hi = mid;
    else
      lo = mid + 1;
  }
  cout << hi << endl;
}
