#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const int N = 100000 + 5;
struct coord {
  int x, y;
  bool operator<(const coord& r) const {
    return make_pair(x, y) < make_pair(r.x, r.y);
  }
};
int n;
coord a[N];
int m1[N], M1[N];
int m2[N], M2[N];
long long res;
long long SQ(int x) { return (long long)x * x; }
int top2, r[N];
bool check(long long D) {
  top2 = 0;
  for (int i = 1; i <= (int)(n - 1); ++i) {
    long long val = SQ(M2[i + 1] - m2[i + 1]);
    val = max(val, max(SQ(M2[i + 1]), SQ(m2[i + 1])) + SQ(a[i].x));
    if (val <= D) r[++top2] = i;
  }
  for (int i = 1; i <= (int)(n); ++i) {
    if (i == 1) continue;
    long long val1 = max(SQ(m1[i - 1]), SQ(M1[i - 1]));
    if (val1 + SQ(a[i].x) > D) continue;
    int st = 1, fi = top2, re = 0;
    while (st <= fi) {
      int md = (st + fi) / 2;
      int j = r[md];
      if (j < i) {
        st = md + 1;
        continue;
      }
      if (val1 + SQ(a[j].x) > D) {
        fi = md - 1;
        continue;
      }
      if (SQ(a[j].x - a[i].x) > D) {
        fi = md - 1;
        continue;
      }
      st = md + 1;
      re = md;
    }
    if (re == 0) continue;
    st = 1, fi = re;
    int re0 = 0;
    while (st <= fi) {
      int md = (st + fi) / 2;
      int j = r[md];
      if (j < i) {
        st = md + 1;
        continue;
      }
      int My = max(M2[j + 1], M1[i - 1]), my = min(m2[j + 1], m1[i - 1]);
      if (SQ(My - my) > D) {
        st = md + 1;
        continue;
      }
      long long val2 = max(SQ(m2[j + 1]), SQ(M2[j + 1]));
      if (SQ(a[i].x) + val2 > D) {
        st = md + 1;
        continue;
      }
      fi = md - 1;
      re0 = md;
    }
    if (re0) return true;
  }
  return false;
}
void solve() {
  scanf("%d", &n);
  for (int i = 1; i <= (int)(n); ++i) scanf("%d%d", &a[i].x, &a[i].y);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= (int)(n); ++i) {
    if (i == 1) {
      M1[i] = m1[i] = a[i].y;
    } else {
      m1[i] = min(m1[i - 1], a[i].y);
      M1[i] = max(M1[i - 1], a[i].y);
    }
  }
  for (int i = (int)(n); i >= 1; --i) {
    if (i == n) {
      M2[i] = m2[i] = a[i].y;
    } else {
      m2[i] = min(m2[i + 1], a[i].y);
      M2[i] = max(M2[i + 1], a[i].y);
    }
  }
  res = min(SQ(M1[n] - m1[n]), SQ(a[n].x - a[1].x));
  for (int i = 1; i <= (int)(n - 1); ++i) {
    long long val = max(SQ(a[i].x - a[1].x), SQ(M2[i + 1] - m2[i + 1]));
    long long val2 =
        max(SQ(a[i].x), SQ(a[1].x)) + max(SQ(M2[i + 1]), SQ(m2[i + 1]));
    val = max(val, val2);
    res = min(res, val);
  }
  for (int i = 2; i <= n; ++i) {
    long long val = max(SQ(a[i].x - a[n].x), SQ(M1[i - 1] - m1[i - 1]));
    long long val2 =
        max(SQ(a[i].x), SQ(a[n].x)) + max(SQ(M1[i - 1]), SQ(m1[i - 1]));
    val = max(val, val2);
    res = min(res, val);
  }
  long long st = 0, fi = res, re = res;
  while (st <= fi) {
    long long md = (st + fi) / 2;
    if (check(md)) {
      re = md;
      fi = md - 1;
    } else
      st = md + 1;
  }
  cout << re << endl;
}
long long RAND() {
  return ((long long)rand() << 32) + ((long long)rand() << 16) + rand();
}
void testgen() {
  FILE* f = fopen("input.txt", "w");
  fclose(f);
}
int main() {
  cout << fixed;
  cout.precision(10);
  cerr << fixed;
  cerr.precision(3);
  solve();
  return 0;
}
