#include <bits/stdc++.h>
using namespace std;
const int infinito = 1000000000;
long long int absolut(long long int x) {
  if (x < 0) return -x;
  return x;
}
long long int sq(long long int x) { return x * x; }
const int limite = 1000000;
int n;
pair<long long int, long long int> v[limite];
long long int maxle[limite], minle[limite], maxri[limite], minri[limite];
bool sepuedele(long long int d) {
  int i2 = 0;
  for (int i = 0; i < n and v[i].first <= 0; i++) {
    i2 = max(i2, i);
    while (i2 < n and sq(v[i2].first - v[i].first) <= d and
           absolut(v[i2].first) <= absolut(v[i].first))
      i2++;
    while (i2 > i and absolut(v[i2 - 1].first) > absolut(v[i].first)) i2--;
    if (i == 0 and i2 == n) return true;
    long long int maxi = -infinito;
    long long int mini = infinito;
    if (i > 0) {
      maxi = max(maxi, maxle[i - 1]);
      mini = min(mini, minle[i - 1]);
    }
    if (i2 < n) {
      maxi = max(maxi, maxri[i2]);
      mini = min(mini, minri[i2]);
    }
    if (sq(maxi) + sq(v[i].first) <= d and sq(mini) + sq(v[i].first) <= d and
        sq(maxi - mini) <= d)
      return true;
  }
  return false;
}
bool sepuederi(long long int d) {
  int i2 = n - 1;
  for (int i = n - 1; i >= 0 and v[i].first >= 0; i--) {
    i2 = min(i2, i);
    while (i2 >= 0 and sq(v[i2].first - v[i].first) <= d and
           absolut(v[i2].first) <= absolut(v[i].first))
      i2--;
    while (i2 < i and absolut(v[i2 + 1].first) > absolut(v[i].first)) i2++;
    if (i == n - 1 and i2 == -1) return true;
    long long int maxi = -infinito;
    long long int mini = infinito;
    if (i < n - 1) {
      maxi = max(maxi, maxri[i + 1]);
      mini = min(mini, minri[i + 1]);
    }
    if (i2 >= 0) {
      maxi = max(maxi, maxle[i2]);
      mini = min(mini, minle[i2]);
    }
    if (sq(maxi) + sq(v[i].first) <= d and sq(mini) + sq(v[i].first) <= d and
        sq(maxi - mini) <= d)
      return true;
  }
  return false;
}
void escribe(long long int v[limite]) {
  for (int i = 0; i < n; i++) cout << v[i] << ",";
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
  sort(v, v + n);
  maxle[0] = minle[0] = v[0].second;
  for (int i = 1; i < n; i++) {
    maxle[i] = max(maxle[i - 1], v[i].second);
    minle[i] = min(minle[i - 1], v[i].second);
  }
  maxri[n - 1] = minri[n - 1] = v[n - 1].second;
  for (int i = n - 2; i >= 0; i--) {
    maxri[i] = max(maxri[i + 1], v[i].second);
    minri[i] = min(minri[i + 1], v[i].second);
  }
  long long int maxy = v[0].second;
  long long int miny = v[0].second;
  for (int i = 0; i < n; i++) {
    maxy = max(maxy, v[i].second);
    miny = min(miny, v[i].second);
  }
  long long int inf = -1;
  long long int sup = sq(maxy - miny);
  while (inf + 1 < sup) {
    long long int med = (inf + sup) / 2;
    if (sepuedele(med) or sepuederi(med))
      sup = med;
    else
      inf = med;
  }
  cout << sup << endl;
}
