#include <bits/stdc++.h>
using namespace std;
const int MAX = 100000 + 5;
int O[MAX];
long long X[MAX], Y[MAX];
int N;
long long ymax[MAX + 1][2], ymin[MAX + 1][2];
bool compare(int a, int b) { return X[a] < X[b]; }
void Read() {
  cin >> N;
  for (int a = 0; a < N; a++) {
    cin >> X[a] >> Y[a];
    O[a] = a;
  }
  sort(O, O + N, compare);
}
void PreCompute() {
  ymax[0][0] = LLONG_MIN;
  ymax[N][1] = LLONG_MIN;
  ymin[0][0] = LLONG_MAX;
  ymin[N][1] = LLONG_MAX;
  for (int a = 0; a < N; a++) {
    int i = O[a];
    long long value = Y[i];
    ymax[a + 1][0] = max(ymax[a][0], value);
    ymin[a + 1][0] = min(ymin[a][0], value);
    int b = N - a - 1;
    int i2 = O[b];
    value = Y[i2];
    ymax[b][1] = max(ymax[b + 1][1], value);
    ymin[b][1] = min(ymin[b + 1][1], value);
  }
}
long long sq2(long long v) { return v * v; }
bool inside(long long m, int start, int end) {
  long long xs = X[O[start]];
  long long xe = X[O[end]];
  if (sq2(xs - xe) > m) {
    return false;
  }
  if (abs(xe) > abs(xs)) {
    return false;
  }
  return true;
}
bool valid(long long m) {
  int start = O[0];
  int end = O[N - 1];
  if (sq2(X[end] - X[start]) <= m) {
    return true;
  }
  if (sq2(ymax[N][0] - ymin[N][0]) <= m) {
    return true;
  }
  for (int base = 0; base < N; base++) {
    int a, b;
    a = base;
    b = N;
    while (a + 1 != b) {
      int h = (a + b) / 2;
      if (inside(m, base, h)) {
        a = h;
      } else {
        b = h;
      }
    }
    int rightEnd = a;
    long long rightYMAX = max(ymax[base][0], ymax[rightEnd + 1][1]);
    long long rightYMIN = min(ymin[base][0], ymin[rightEnd + 1][1]);
    long long rightYDIS = sq2(rightYMAX - rightYMIN);
    long long rightDis =
        max(sq2(rightYMAX) + sq2(X[O[base]]), sq2(rightYMIN) + sq2(X[O[base]]));
    if (rightDis <= m and rightYDIS <= m) {
      return true;
    }
    a = -1;
    b = base;
    while (a + 1 != b) {
      int h = (a + b) / 2;
      if (inside(m, base, h)) {
        b = h;
      } else {
        a = h;
      }
    }
    int leftEnd = b;
    long long leftYMAX = max(ymax[leftEnd][0], ymax[base + 1][1]);
    long long leftYMIN = min(ymin[leftEnd][0], ymin[base + 1][1]);
    long long leftYDIS = sq2(leftYMAX - leftYMIN);
    long long leftDis =
        max(sq2(leftYMAX) + sq2(X[O[base]]), sq2(leftYMIN) + sq2(X[O[base]]));
    if (leftDis <= m and leftYDIS <= m) {
      return true;
    }
  }
  return false;
}
long long BinarySearch() {
  long long a = -1;
  long long b = LLONG_MAX;
  while (a + 1 != b) {
    long long h = (a + b) / 2;
    if (valid(h)) {
      b = h;
    } else {
      a = h;
    }
  }
  return b;
}
int main() {
  Read();
  PreCompute();
  cout << BinarySearch() << '\n';
}
