Many computer strategy games require building cities, recruiting army, conquering tribes, collecting resources. Sometimes it leads to interesting problems. 

Let's suppose that your task is to build a square city. The world map uses the Cartesian coordinates. The sides of the city should be parallel to coordinate axes. The map contains mines with valuable resources, located at some points with integer coordinates. The sizes of mines are relatively small, i.e. they can be treated as points. The city should be built in such a way that all the mines are inside or on the border of the city square. 

Building a city takes large amount of money depending on the size of the city, so you have to build the city with the minimum area. Given the positions of the mines find the minimum possible area of the city.

Input

The first line of the input contains number n — the number of mines on the map (2 ≤ n ≤ 1000). Each of the next n lines contains a pair of integers xi and yi — the coordinates of the corresponding mine ( - 109 ≤ xi, yi ≤ 109). All points are pairwise distinct.

Output

Print the minimum area of the city that can cover all the mines with valuable resources.

Examples

Input

2
0 0
2 2


Output

4


Input

2
0 0
0 3


Output

9
import java.io.*;
import java.util.StringTokenizer;
import static java.util.Arrays.*;


public class Main {
    
    void solve() throws IOException {
        int n = nextInt();
        int[] x = new int[n];
        int[] y = new int[n];
        
        long minX = Integer.MAX_VALUE, minY = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE, maxY = Integer.MIN_VALUE;
        
        for (int i = 0; i < n; i++) {
            x[i] = nextInt();
            y[i] = nextInt();
            if (x[i] < minX)
                minX = x[i];
            if (x[i] > maxX)
                maxX = x[i];
            if (y[i] < minY)
                minY = y[i];
            if (y[i] > maxY)
                maxY = y[i];
        }
        
        long ans = Math.max(maxX - minX, maxY - minY) * Math.max(maxX - minX, maxY - minY);
//      if (ans == 0)
//          ans = Math.max(maxX - minX, maxY - minY);
        out.println(ans);
    }
    
    class MultiList {
        int[] head, next, dest;
        int en;
        
        MultiList(int vNum, int eNum) {
            head = new int[vNum];
            next = new int[eNum + 1];
            dest = new int[eNum + 1];
            clearGraph();
        }
        
        void clearGraph() {
            fill(head, -1);
            en = 0;
        }
        
        void addEdge(int u, int v) {
            dest[en] = v;
            next[en] = head[u];
            head[u] = en;
            en++;
        }
    }
    
    int gcd(int a, int b) {
        return (b == 0) ? a : gcd(b, a % b);
    }
    
    int lcm(int a, int b) {
        return a / gcd(a, b) * b;
    }
    
    int modulo(int x, int y) {
        return (x % y + y) % y;
    }
    
    public static void main(String[] args) throws IOException {
        new Main().run();
    }
    
    final String fileIn = "input.txt";
    final String fileOut = "output.txt";
    BufferedReader in;
    PrintWriter out;
    StringTokenizer st = new StringTokenizer("");
    
    private void run() throws IOException {
        if (new File(fileIn).exists())
            in = new BufferedReader(new FileReader(fileIn));
        else
            in = new BufferedReader(new InputStreamReader(System.in));
        
        out = new PrintWriter(System.out);
//      out = new PrintWriter(new FileWriter(fileOut));
        
        solve();
        
        in.close();
        out.close();
    }
    
    String nextToken() throws IOException {
        while (!st.hasMoreTokens())
            st = new StringTokenizer(in.readLine());
        return st.nextToken();
    }
    
    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    
    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    
    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }
    
    String nextString() throws IOException {
        st = new StringTokenizer("");
        return in.readLine();
    }
    
    boolean EOF() throws IOException {
        while (!st.hasMoreTokens()) {
            String s = in.readLine();
            if (s == null)
                return true;
            st = new StringTokenizer(s);
        }
        return false;
    }
}
