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.*;

public class Task {
		
	public static void main(String[] args) throws IOException {
		new Task().solve();
	}
	
	PrintWriter out;
	int cnt = 0;
	int n;
	boolean[] used;
	int[] use;
	ArrayList<Item>[] gr;
	ArrayList<Integer> tsort = new ArrayList<Integer>();
	int[] comp;
	int[] compsize;
	int[] mt;
	int[] a;
	int k;
	boolean[][] g;
	long dp[];
	int m;
	int[] list;
	int d;
	int ver = 0;
	int mod = 1000000007;
	void solve() throws IOException{
		Reader in = new Reader("output.txt");
		out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(System.out)) );
		//out = new PrintWriter(new FileWriter(new File("output.txt"))); 
		
		int n = in.nextInt();
		
		int[][] a = new int[n][2];
		
		for (int i = 0; i < n; i++) {
			a[i][0] = in.nextInt();
			a[i][1] = in.nextInt();
		}
		
		int x1 = a[0][0];
		int y1 =a[0][1];
		
		int x2 = a[1][0];
		int y2 =a[1][1];
		
		for (int i = 0; i < n; i++) {
			x1 = Math.min(x1, a[i][0]);
			y1 = Math.min(y1, a[i][1]);
			x2 = Math.max(x2, a[i][0]);
			y2 = Math.max(y2, a[i][1]);
		}
		
		long w = Math.max(x2-x1, y2-y1);
		
		out.print(w*w);
		
		out.flush();
		out.close();
		
	}
	
	
	long pow(int x, int m) {
		if (m == 0)
			return 1;
		return x*pow(x, m-1);
	}

}
	
	class Pair implements Comparable<Pair> {
		
		long v;
		int i;
		
		Pair (long v, int i) {
			this.v = v;
			this.i = i;
		}

		@Override
		public int compareTo(Pair p) {
			if (v < p.v)
				return 1;
			if (v > p.v)
				return -1;
			return 0;
		}
		
	}

	class Item implements Comparable<Item> {

		int a;
		int b;
		long u;
		
		Item(int v, int l, long z) {
			this.a = v;
			this.b = l;
			this.u = z;
		}
		
		@Override
		public int compareTo(Item item) {
			
			if (u > item.u)
				return 1;
			else
			if (u < item.u)
				return -1;
			else {
				return 0;
			}
						
		}
		
	}
	
	class Reader {
	    
	    StringTokenizer token;
	    BufferedReader in;
	    
	    public Reader(String file) throws IOException {
	        //in = new BufferedReader( new FileReader( file ) );
	        in = new BufferedReader( new InputStreamReader( System.in ) );
	    }
	    
	    public byte nextByte() throws IOException {
	        return Byte.parseByte(Next());
	    }
	    
	    public int nextInt() throws IOException {
	        return Integer.parseInt(Next());
	    }
	    
	    public long nextLong() throws IOException {
	        return Long.parseLong(Next());
	    }
	    
	    public String nextString() throws IOException {
	        return in.readLine();
	    }
	    
	    public String Next() throws IOException {
	        while (token == null || !token.hasMoreTokens()) {
	            token = new StringTokenizer(in.readLine());
	        }
	        return token.nextToken();
	    }

	    
	}

	
