#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1e18 + 7LL;
const int limC = (int)1e9 + 7;
template <class X, class Y>
void minimize(X &x, const Y &y) {
  if (x > y) x = y;
}
template <class X, class Y>
void maximize(X &x, const Y &y) {
  if (x < y) x = y;
}
pair<int, int> point[100100];
int minLeft[100100], minRight[100100], maxLeft[100100], maxRight[100100];
int n;
void init(void) {
  scanf("%d", &n);
  for (int i = (1), _b = (n); i <= _b; i = i + 1)
    scanf("%d%d", &point[i].first, &point[i].second);
  sort(point + 1, point + n + 1);
}
void prepare(void) {
  minLeft[1] = maxLeft[1] = point[1].second;
  for (int i = (2), _b = (n); i <= _b; i = i + 1) {
    minLeft[i] = min(minLeft[i - 1], point[i].second);
    maxLeft[i] = max(maxLeft[i - 1], point[i].second);
  }
  minRight[n] = maxRight[n] = point[n].second;
  for (int i = (n - 1), _a = (1); i >= _a; i = i - 1) {
    minRight[i] = min(minRight[i + 1], point[i].second);
    maxRight[i] = max(maxRight[i + 1], point[i].second);
  }
}
bool checkX(long long r) {
  int maxVal = point[1].first;
  int minVal = point[1].first;
  for (int i = (1), _b = (n); i <= _b; i = i + 1) {
    minimize(minVal, point[i].first);
    maximize(maxVal, point[i].first);
  }
  return (maxVal - minVal <= r);
}
bool checkY(long long r) {
  int maxVal = point[1].second;
  int minVal = point[1].second;
  for (int i = (1), _b = (n); i <= _b; i = i + 1) {
    minimize(minVal, point[i].second);
    maximize(maxVal, point[i].second);
  }
  return (maxVal - minVal <= r);
}
long long getSQRT(long long x) {
  long long t = sqrt(x);
  for (int i = (-10), _b = (10); i <= _b; i = i + 1)
    if (i + t >= 0 && (1LL * (i + t) * (i + t)) > x) return (i + t - 1);
  assert(false);
}
bool CompX(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first < b.first);
}
bool ok(long long bigR) {
  long long smallR = getSQRT(bigR);
  if (checkX(smallR) || checkY(smallR)) return (true);
  for (int i = (1), _b = (n); i <= _b; i = i + 1) {
    long long minX, maxX;
    if (point[i].first == 0)
      minX = maxX = 0;
    else if (point[i].first > 0) {
      maxX = point[i].first;
      minX = max(0LL - point[i].first, maxX - smallR);
    } else {
      minX = point[i].first;
      maxX = min(0LL - point[i].first, minX + smallR);
    }
    minimize(maxX, limC);
    maximize(minX, -limC);
    int L = lower_bound(point + 1, point + n + 1, pair<int, int>(minX, minX),
                        CompX) -
            point;
    int R = upper_bound(point + 1, point + n + 1, pair<int, int>(maxX, maxX),
                        CompX) -
            point - 1;
    int maxY = -limC;
    int minY = limC;
    if (L > 1) {
      maximize(maxY, maxLeft[L - 1]);
      minimize(minY, minLeft[L - 1]);
    }
    if (R < n) {
      maximize(maxY, maxRight[R + 1]);
      minimize(minY, minRight[R + 1]);
    }
    if (maxY < minY) return (true);
    if (maxY - minY <= smallR &&
        max((1LL * (maxX) * (maxX)), (1LL * (minX) * (minX))) +
                max((1LL * (maxY) * (maxY)), (1LL * (minY) * (minY))) <=
            bigR)
      return (true);
  }
  return (false);
}
long long process(void) {
  long long L = 0;
  long long R = INF;
  while (true) {
    if (L == R) return (R);
    if (R - L == 1) return (ok(L) ? L : R);
    long long M = (L + R) >> 1;
    if (ok(M))
      R = M;
    else
      L = M + 1;
  }
}
int main(void) {
  init();
  prepare();
  cout << process() << endl;
  return 0;
}
