#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
bool prime[1000000 + 1];
void seive() {
  long long int N = 1e6 + 1;
  memset(prime, true, sizeof(prime));
  prime[0] = false;
  prime[1] = false;
  for (long long int i = 2; i * i <= N; i++) {
    if (prime[i]) {
      for (long long int j = i * i; j <= N; j += i) {
        prime[j] = false;
      }
    }
  }
}
bool isPowerOfTwo(int x) { return (x && !(x & (x - 1))); }
bool is_prime(int n) {
  if (n == 1) return false;
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
void hemant() {
  long long int n, m;
  cin >> n;
  long long int lx = 1000000000000000003, ly = 1000000000000000003;
  long long int rx = -1000000000000000003, ry = -1000000000000000003;
  while (n--) {
    long long int x, y;
    cin >> x >> y;
    lx = ((x > lx) ? lx : x);
    ly = ((y > ly) ? ly : y);
    rx = (x < rx ? rx : x);
    ry = (y < ry ? ry : y);
  }
  long long int s = (abs(lx - rx) < abs(ry - ly) ? abs(ry - ly) : abs(lx - rx));
  cout << s * s << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    hemant();
  }
  return 0;
}
