#include <bits/stdc++.h>
using namespace std;
int n;
vector<pair<long long, long long> > v1, v2;
vector<long long> mx1, mn1;
long long mx2[100005], mn2[100005];
long long totmx[2], totmn[2];
void init() {
  bool flg = true;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    pair<long long, long long> tp;
    scanf("%I64d%I64d", &tp.first, &tp.second);
    if (flg) {
      totmx[0] = totmn[0] = tp.first;
      totmx[1] = totmn[1] = tp.second;
      flg = false;
    }
    totmx[0] = max(totmx[0], tp.first);
    totmn[0] = min(totmn[0], tp.first);
    totmx[1] = max(totmx[1], tp.second);
    totmn[1] = min(totmn[1], tp.second);
    if (tp.first < 0)
      v1.push_back(tp);
    else
      v2.push_back(tp);
  }
  sort(v1.begin(), v1.end());
  sort(v2.begin(), v2.end());
  if (v1.size())
    mx1.push_back(max(0LL, v1.begin()->second));
  else
    mx1.push_back(0);
  if (v1.size())
    mn1.push_back(min(0LL, v1.begin()->second));
  else
    mn1.push_back(0);
  for (int i = 1; i < (int)v1.size(); i++) {
    mx1.push_back(max(mx1.back(), v1[i].second));
    mn1.push_back(min(mn1.back(), v1[i].second));
  }
  mx2[(int)v2.size()] = mn2[(int)v2.size()] = 0;
  for (int i = (int)v2.size() - 1; i >= 0; i--) {
    mx2[i] = max(mx2[i + 1], v2[i].second);
    mn2[i] = min(mn2[i + 1], v2[i].second);
  }
}
const long long INF = 1000000000000000000LL;
bool ok(long long th) {
  for (int i = (int)v2.size() - 1; i >= 0; i--) {
    if (v2[i].first * v2[i].first > th) continue;
    long long bb = max(-v2[i].first, (long long)ceil((double)v2[i].first -
                                                     sqrt((long double)th)));
    int idx = lower_bound(v1.begin(), v1.end(),
                          pair<long long, long long>(bb, -INF)) -
              v1.begin();
    long long left = (idx == (int)v1.size()) ? 0 : v1[idx].first;
    long long ymx, ymn;
    if (idx == 0)
      ymx = ymn = 0;
    else
      ymx = mx1[idx - 1], ymn = mn1[idx - 1];
    ymx = max(ymx, mx2[i + 1]);
    ymn = min(ymn, mn2[i + 1]);
    long long maxnow = 0;
    maxnow = max(maxnow, (ymx - ymn) * (ymx - ymn));
    maxnow = max(maxnow, max(ymx, -ymn) * max(ymx, -ymn) +
                             max(-left, v2[i].first) * max(-left, v2[i].first));
    if (maxnow <= th) return true;
  }
  for (int i = 0; i < (int)v1.size(); i++) {
    if (v1[i].first * v1[i].first > th) continue;
    long long bb = min(-v1[i].first, (long long)floor((double)v1[i].first +
                                                      sqrt((long double)th)));
    int idx =
        upper_bound(v2.begin(), v2.end(), pair<long long, long long>(bb, INF)) -
        v2.begin() - 1;
    long long left = (idx == -1) ? 0 : v2[idx].first;
    long long ymx, ymn;
    ymx = mx2[idx + 1], ymn = mn2[idx + 1];
    if (i) ymx = max(ymx, mx1[i - 1]);
    if (i) ymn = min(ymn, mn1[i - 1]);
    long long maxnow = 0;
    maxnow = max(maxnow, (ymx - ymn) * (ymx - ymn));
    maxnow = max(maxnow, max(ymx, -ymn) * max(ymx, -ymn) +
                             max(left, -v1[i].first) * max(left, -v1[i].first));
    if (maxnow <= th) return true;
  }
  return false;
}
void process() {
  long long low = 0, high = 1000000000000000000LL;
  high = min(high, (totmx[0] - totmn[0]) * (totmx[0] - totmn[0]));
  high = min(high, (totmx[1] - totmn[1]) * (totmx[1] - totmn[1]));
  while (low < high) {
    long long mid = (low + high) / 2;
    if (ok(mid))
      high = mid;
    else
      low = mid + 1;
  }
  cout << low << endl;
}
int main() {
  init();
  process();
  return 0;
}
