import java.util.*;
import java.math.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int x_max = Integer.MIN_VALUE;
            int y_max = Integer.MIN_VALUE;
            int x_min = Integer.MAX_VALUE;
            int y_min = Integer.MAX_VALUE;
            for(int i=0;i<n;i++){ 
                int x = in.nextInt();
                // System.out.println(x);
                int y = in.nextInt();
                x_max = (int)Math.max(x_max,x);
                x_min = (int)Math.min(x_min,x);
                y_max = (int)Math.max(y_max,y);
                y_min = (int)Math.min(y_min,y);
            }
            // System.out.println(y_max);
            int side = Math.max((x_max-x_min),(y_max-y_min));
            System.out.println(side*side);
    }
    }
}