// ConsoleApplication10.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
//找到最大值和最小值得差值
int getGap(vector<int> vec)
{
int max = vec[0];
int min = vec[0];
for (int i = 1;i < vec.size();i++)
{
if (max < vec[i])
{
max = vec[i];
}
if(min> vec[i])
{
min = vec[i];
}
}
return max - min;
}
int main()
{
int n;
while (cin>>n)
{
vector<int> width;
vector<int> heigh;
int w, h;
int flag = 0;
while (cin >> w >> h)
{
width.push_back(w);
heigh.push_back(h);
flag++;
if (flag == n) break;
}
cout << max(getGap(width), getGap(heigh))*max(getGap(width), getGap(heigh))<<endl;
}
return 0;
};