#include <iostream>
using namespace std;
#include<algorithm>
#include<vector>
int main() {
int n;
while (cin >> n) {
vector<int> v1;//x坐标
vector<int>v2;//y坐标
for (int i = 0; i < n; i++) {
int res;
cin >> res;
v1.push_back(res);
cin >> res;
v2.push_back(res);
}
sort(v1.begin(), v1.end());
sort(v2.begin(), v2.end());
int x1 = v1[n - 1] - v1[0], x2 = v2[n - 1] - v2[0];
int l = x1 > x2 ? x1 : x2;
cout << l* l << endl;
}
return 0;
}