#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e9 + 7;
int cal(int j) {
  int sum1 = ((j) * (j - 1)) / 2;
  return (sum1);
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int findGCD(int arr[], int n) {
  int result = arr[0];
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int lcm(int a, int b) { return (a / gcd(a, b)) * b; }
bool isPrime(int n) {
  if (n <= 1) return false;
  for (int i = 2; i < n; i++)
    if (n % i == 0) return false;
  return true;
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
bool isNumber(string s) {
  for (int i = 0; i < s.length(); i++)
    if (isdigit(s[i]) == false) return false;
  return true;
}
int maxi(int a, int b, int c) {
  int ma = max(a, b);
  return (max(ma, c));
}
int ldn(int n) {
  if (n % 2 == 0)
    return (2);
  else {
    int i;
    for (i = 3; i * i <= n; i++) {
      if (n % i == 0) return (i);
    }
    return (n);
  }
}
int dig(long long n) {
  long long sum = 0;
  while (n > 0) {
    sum++;
    n = n / 10;
  }
  return (sum);
}
string solveEquation(string equation) {
  int n = equation.size(), sign = 1, coeff = 0;
  int total = 0, i = 0;
  for (int j = 0; j < n; j++) {
    if (equation[j] == '+' || equation[j] == '-') {
      if (j > i) {
        total += sign * stoi(equation.substr(i, j - i));
        cout << "->" << total << stoi(equation.substr(i, j - i))
             << equation.substr(i, j - i) << endl;
      }
      i = j;
    } else if (equation[j] == 'x') {
      if ((i == j) || equation[j - 1] == '+')
        coeff += sign;
      else if (equation[j - 1] == '-')
        coeff -= sign;
      else
        coeff += sign * stoi(equation.substr(i, j - i));
      i = j + 1;
    } else if (equation[j] == '=') {
      if (j > i) total += sign * stoi(equation.substr(i, j - i));
      sign = -1;
      i = j + 1;
    }
  }
  if (i < n) total += sign * stoi(equation.substr(i));
  if (coeff == 0 && total == 0) return "Infinite solutions";
  if (coeff == 0 && total) return "No solution";
  int ans = -total / coeff;
  return "x=" + to_string(ans);
}
bool is_integer(float k) { return std::floor(k) == k; }
string separator(string s) {
  int i, j, k, pos = 0, n = s.length(), elf = 0;
  string coeff = "", cons = "";
  for (i = 0; i < n; i++) {
    if (s[i] == 'x') {
      for (j = i; j >= 0; j--) {
        pos = j;
        if (s[j] == '+' || s[j] == '-') {
          break;
        }
      }
      coeff += s.substr(pos, i - pos);
      if (s.substr(pos, i - pos) == "" || s.substr(pos, i - pos) == "+") {
        coeff += '1';
      }
      if (pos - elf - 1 > 0) cons += s.substr(elf + 1, pos - elf - 1);
      elf = i;
    }
  }
  cout << coeff << " " << cons << endl;
  return (coeff);
}
string quadsep(string s) {
  int i, j, k, pos = 0, n = s.length(), elf = 0;
  string xcoeff = "", cons = "", x2coeff = "";
  for (i = 0; i < n; i++) {
    if (s[i] == 'x') {
      for (j = i; j >= 0; j--) {
        pos = j;
        if (s[j] == '+' || s[j] == '-') {
          break;
        }
      }
      if (s[i + 1] == '2') {
        x2coeff += s.substr(pos, i - pos);
        if (s.substr(pos, i - pos) == "" || s.substr(pos, i - pos) == "+") {
          x2coeff += '1';
        }
        i++;
      } else {
        xcoeff += s.substr(pos, i - pos);
        if (s.substr(pos, i - pos) == "" || s.substr(pos, i - pos) == "+") {
          xcoeff += '1';
        }
      }
      if (pos - elf - 1 > 0) cons += s.substr(elf + 1, pos - elf - 1);
      elf = i;
    }
  }
  cout << x2coeff << " " << xcoeff << " " << cons << endl;
  return (cons);
}
void mycode() {
  long long n, i, j, d, k, m, count = 0, sum = 0;
  string s;
  cin >> n;
  vector<long long> a, b;
  for (i = 0; i < n; i++) {
    cin >> j >> d;
    a.push_back(j);
    b.push_back(d);
  }
  long long mil =
      max(*max_element(a.begin(), a.end()) - *min_element(a.begin(), a.end()),
          *max_element(b.begin(), b.end()) - *min_element(b.begin(), b.end()));
  cout << mil * mil << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    mycode();
  }
  return 0;
}
