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 org.omg.CORBA.MARSHAL;

import java.io.*;
//import java.lang.reflect.Array;
import java.lang.reflect.Array;
import java.util.*;


public class citylights {
    public static int[] arr;
    public static ArrayList<Integer> p;
    public static int[] val;
    public static long[] facto;
    public static long mod = 100000;
    public static long[] fillme;
   // public static HashMap<pair, Integer> hs;
    public static int ans = 0;
    public static int n, k;
    // public static int []tt;

//--------------------------------------My Code--------------------------------------------

    public static void main(String[] args) throws IOException {
        arr = new int[1000001];
        p = new ArrayList<>();
        val = new int[1000001];
        facto = new long[1000007];
        //tt=new int[100];

        fillme = new long[1000007];

        //sieve();
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n=in.nextInt();
        long []a=new long[n];
        long []b=new long[n];
        for (int i=0;i<n;i++)
        {
            long x=(in.nextLong());
            long y=(in.nextLong());
            a[i]=x;
            b[i]=y;


        }
        long maxx=Long.MIN_VALUE;
        long minx=Long.MAX_VALUE;
        for (int i=0;i<n;i++)
        {
            if(maxx<a[i])
            {
                maxx=a[i];
            }
            if(minx>a[i])
            {
                minx=a[i];
            }
        }
        long maxy=Long.MIN_VALUE;
        long miny=Long.MAX_VALUE;
        for (int i=0;i<n;i++)
        {
            if(maxy<b[i])
            {
                maxy=b[i];
            }
            if(miny>b[i])
            {
                miny=b[i];
            }
        }
        long max=Math.max(maxx-minx,maxy-miny);
        out.println(max*max);

         out.close();
    }
    //-------------------------------------------Code ends-------------------------------
    public static String rot1(String in)
    {
        return in.substring(1,in.length())+in.charAt(0);
    }



    public static long bsearchg(int[] a, int t) {
        long ans = 0;
        int low = 0;
        int high = a.length - 1;
        while (low <= high) {
            int mid = (low + high) / 2;
            if (a[mid] <= t) {
                ans = mid;
                low = mid + 1;
            } else
                high = mid - 1;


        }
        return ans;

    }


    private static long fib(long n) {
        if (n == 1) return 2l;
        if (n == 0) return 1l;
        long[][] F = new long[][]{{1, 1}, {1, 0}};
        matPow(F, n);
        return F[0][0];
        //return 0l;
    }

    private static void matPow(long[][] F, long n) {
        if (n == 0 || n == 1)
            return;
        long M[][] = new long[][]{{1, 1}, {1, 0}};

        matPow(F, n / 2);
        matrixMult(F, F);

        if (n % 2 != 0)
            matrixMult(F, M);
    }

    private static void matrixMult(long A[][], long M[][]) {
        long a = ((A[0][0] * M[0][0]) % mod + (A[0][1] * M[1][0]) % mod) % mod;
        long b = ((A[0][0] * M[0][1]) % mod + (A[0][1] * M[1][1]) % mod) % mod;
        long c = ((A[1][0] * M[0][0]) % mod + (A[1][1] * M[1][0]) % mod) % mod;
        long d = ((A[1][0] * M[0][1]) % mod + (A[1][1] * M[1][1]) % mod) % mod;

        A[0][0] = a;
        A[0][1] = b;
        A[1][0] = c;
        A[1][1] = d;
    }

    private static long lcm(long a, long b) {
        return (long) ((a * b) / euclgcd(a, b));
    }

    public static int[] rotate(int[] order, int by) {
        int length = order.length;
        int[] a = new int[length];
        for (int i = 0; i < length; i++) {
            a[(i + by) % length] = order[i];

        }
        return a;


    }

    public static long modinv(long x, long m) {
        return powmod(x, m - 2, m);

    }

    public static long eulertoitent(long n) {
        long res = n;
        for (int i = 2; i * i <= n; i++)
            if (n % i == 0) {
                while (n % i == 0)
                    n /= i;
                res -= res / i;
            }
        if (n > 1)
            res -= res / n;
        return res;


    }

    //calculate factorial till modulas
    public static void fact() {
        facto[0] = 1;
        for (int i = 1; i <= mod; i++) {
            facto[i] = (i * facto[i - 1]) % mod;
        }


    }

    public static void sieve() {
        arr[0] = 1;
        arr[1] = 1;

        for (int i = 2; i * i < 1000001; i++) {
            if (arr[i] == 0) {

                for (int j = i * i; j < 1000001; j += i) {
                    arr[j] = 1;
                }
            }
        }
        for (int i = 2; i < 1000001; i++) {
            if (arr[i] == 0)
                p.add(i);
        }
    }

    public static boolean isPrime(int n) {
        // Corner cases
        if (n <= 1) return false;
        if (n <= 3) return true;

        // This is checked so that we can skip
        // middle five numbers in below loop
        if (n % 2 == 0 || n % 3 == 0) return false;

        for (int i = 5; i * i <= n; i = i + 6)
            if (n % i == 0 || n % (i + 2) == 0)
                return false;

        return true;
    }

    public static long euclgcd(long a, long b) {
        if (b == 0)
            return a;
        else
            return euclgcd(b, a % b);

    }

    public static long powmod(long x, long n, long m) {
        long result = 1L;
        while (n > 0) {
            if (n % 2 == 1)
                result = (result * x) % m;
            x = (x * x) % m;
            n = n / 2;
        }

        return result;
    }


    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }


}