#include <bits/stdc++.h>
using namespace std;
const int BUFFER_SIZE = (1 << 16);
char buffer[BUFFER_SIZE];
int position = BUFFER_SIZE;
inline char getChar() {
  if (position == BUFFER_SIZE) {
    position = 0;
    fread(buffer, BUFFER_SIZE, 1, stdin);
  }
  return buffer[position++];
}
inline int getInt() {
  register int a = 0;
  char ch;
  int sgn = 1;
  do {
    ch = getChar();
  } while (!isdigit(ch) && ch != '-');
  if (ch == '-') {
    sgn = -1;
    ch = getChar();
  }
  do {
    a = (a << 3) + (a << 1) + ch - '0';
    ch = getChar();
  } while (isdigit(ch));
  return a * sgn;
}
const int MAX_N = 100000 + 1;
const int INF = numeric_limits<int>::max() / 2;
pair<int, int> P[MAX_N];
pair<int, int> prefix[MAX_N], suffix[MAX_N];
int N;
long long square(int first) { return 1LL * first * first; }
bool valid(long long M) {
  long long bestY, bestXY;
  int i = 1, j = 1;
  while (i <= N) {
    while (square(P[i].first - P[j].first) > M) j++;
    assert(j <= i);
    assert(square(P[i].first - P[j].first) <= M);
    int maxY = -INF;
    int minY = INF;
    bool changed = false;
    if (j > 1) {
      changed = true;
      minY = min(minY, prefix[j - 1].first);
      maxY = max(maxY, prefix[j - 1].second);
    }
    if (i < N) {
      changed = true;
      minY = min(minY, suffix[i + 1].first);
      maxY = max(maxY, suffix[i + 1].second);
    }
    if (changed) {
      bestY = square(maxY - minY);
      bestXY = max(square(maxY), square(minY)) +
               max(square(P[i].first), square(P[j].first));
    } else
      bestY = 0, bestXY = 0;
    if (bestY <= M && bestXY <= M) return true;
    i++;
  }
  return false;
}
void makePrefixSuffix() {
  pair<int, int> p = {INF, -INF};
  for (int i = 1; i <= N; ++i) {
    p.first = min(p.first, P[i].second);
    p.second = max(p.second, P[i].second);
    prefix[i] = p;
  }
  p = {INF, -INF};
  for (int i = N; i >= 1; i--) {
    p.first = min(p.first, P[i].second);
    p.second = max(p.second, P[i].second);
    suffix[i] = p;
  }
}
long long binarySearch() {
  long long l = 0;
  long long r = 1LL * INF * INF >> 1;
  long long sol = -1;
  while (l <= r) {
    long long m = (l + r) / 2;
    if (valid(m)) {
      sol = m;
      r = m - 1;
    } else
      l = m + 1;
  }
  return sol;
}
int main() {
  N = getInt();
  for (int i = 1; i <= N; ++i) {
    P[i].first = getInt();
    P[i].second = getInt();
  }
  sort(P + 1, P + N + 1);
  makePrefixSuffix();
  long long sol1 = binarySearch();
  for (int i = 1; i <= N; ++i) swap(P[i].first, P[i].second);
  sort(P + 1, P + N + 1);
  makePrefixSuffix();
  long long sol2 = binarySearch();
  cout << min(sol1, sol2) << "\n";
  return 0;
}
