直接上BigInteger import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
long maxx = Integer.MIN_VALUE;
long maxy = Integer.MIN_VALUE;
long minx = Integer.MAX_VALUE;
long miny = Integer.MAX_VALUE;
for (int i = 0; i < n; i++) {
int x = in.nextInt();
int y = in.nextInt();
maxx = Math.max(maxx, x);
maxy = Math.max(maxy, y);
minx = Math.min(minx, x);
miny = Math.min(miny, y);
}
long a = Math.max(maxx - minx, maxy - miny);
BigInteger ans = BigInteger.valueOf(a).pow(2);
System.out.println(ans);
}
}