import java.io.*;
import java.util.*;

public class Codeforces {

    public static final long MOD = 1_000_000_007;

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

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

        if (n < 2) {
            out.println(-1);
            out.close();
            return;
        }

        if (n == 2) {
            if (x[0] == x[1] || y[0] == y[1]) {
                out.println(-1);
            } else {
                out.println(Math.abs(x[0] - x[1]) * Math.abs(y[0] - y[1]));
            }
            out.close();
            return;
        }

        Arrays.sort(x);
        Arrays.sort(y);

        out.println((x[x.length - 1] - x[0]) * (y[y.length - 1] - y[0]));
        out.close();
    }

    public static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int[] nextIntArr(int n) {
            int[] arr = new int[n];
            for (int j = 0; j < arr.length; j++) {
                arr[j] = nextInt();
            }

            return arr;
        }

        public long[] nextLongArr(int n) {
            long[] arr = new long[n];
            for (int j = 0; j < arr.length; j++) {
                arr[j] = nextLong();
            }

            return arr;
        }
    }
}

import java.util.*;
public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int v = sc.nextInt(), restax, restay, x, y, x1, y1 = 0, x2, y2, x3, y3, resta, mult = 0;
		if(v == 1)
			System.out.println("-1");
			else {
				if(v == 2){
					x = sc.nextInt() + 10000;
					y = sc.nextInt() + 10000;
					x1 = sc.nextInt() + 10000;
					y1 = sc.nextInt() + 10000;
					restay = y1 - y;
					restax = x1 - x;
					mult = (restax)*(restay);
					if(mult == 0)
						System.out.println("-1");
					else {
						if(mult < 0)
							mult= mult*-1;
						System.out.println(mult);
					}
				} else {
					if(v == 3){
						x = sc.nextInt() + 1000;
						y = sc.nextInt() + 1000;
						x1 = sc.nextInt() + 1000;
						y1 = sc.nextInt() + 1000;
						x2 = sc.nextInt() + 1000;
						y2 = sc.nextInt() + 1000;
					if((x-x1) == 0){
						restay = y - y1;
						restax = x - x2;
						if(restax == 0)
							restax = x - x1;
						mult = restay*restax;
					} else {
						restax = x - x1;
						restay = y - y2;
						if(restay == 0)
							restay = y - y1;
						mult = restay*restax;
					}
						if(mult == 0)
							System.out.println("-1");
						else {
							if(mult < 0)
								mult= mult*-1;
							System.out.println(mult);
					}
					} else {
						x = sc.nextInt() + 1000;
						y = sc.nextInt() + 1000;
						x1 = sc.nextInt() + 1000;
						y1 = sc.nextInt() + 1000;
						x2 = sc.nextInt() + 1000;
						y2 = sc.nextInt() + 1000;
						x3 = sc.nextInt() + 1000;
						y3 = sc.nextInt() + 1000;
						if((x-x1) == 0){
							restay = y - y1;
							restax = x - x2;
							if(restax == 0)
								restay = x - x3;
							mult = restay*restax;
							} else {
							restax = x - x1;
							restay = y - y2;
							if(restay == 0)
								restay = y - y3;
							mult = restay*restax;
							}
						if(mult == 0)
							System.out.println("-1");
						else {
							if(mult < 0)
								mult= mult*-1;
							System.out.println(mult);
					}
					}
				}
			}
	}
}

import java.io.*;
import java.util.*;

public class CF331A{

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

        int n = sc.nextInt();

        int minx, maxx, miny, maxy;

        minx = sc.nextInt();
        maxx = minx;
        miny = sc.nextInt();
        maxy = miny;

        for (int i=1; i<n; i++) {
            int x = sc.nextInt();
            int y = sc.nextInt();
            if (x<minx) {
                minx = x;
            }
            if (x>maxx) {
                maxx = x;
            }
            if (y<miny) {
                miny = y;
            }
            if (y>maxy) {
                maxy = y;
            }
        }

        int s = (maxx-minx)*(maxy-miny);

        if (s == 0) {
            out.println("-1");
        } else {
            out.println(s);
        }

        out.close();
    }
}

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] xy = new int[n][2];
        for (int i = 0; i < n; i++) {
            xy[i][0] = scanner.nextInt();
            xy[i][1] = scanner.nextInt();
        }
        int a = -1;
        search: for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                if (xy[i][0] != xy[j][0] && xy[i][1] != xy[j][1]) {
                    a = Math.abs(xy[i][0] - xy[j][0]) * Math.abs(xy[i][1] - xy[j][1]);
                    break search;
                }
            }
        }
        System.out.println(a);
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class R331Div2A {
	static class Point{
		int x;
		int y;
		public Point(int x1,int y1){
			this.x=x1;
			this.y=y1;
		}
	}
	public static void main(String[] args) {
		FastScanner in=new FastScanner();
		int n=in.nextInt();
		Point[] arr=new Point[4];
		for(int i=0;i<n;i ++)
			arr[i]=new Point(in.nextInt(),in.nextInt());
		if(n==1){
			System.out.println(-1);
		}else if(n==2){
			if(arr[0].x==arr[1].x||arr[0].y==arr[1].y)
				System.out.println(-1);
			else
				System.out.println(Math.abs((arr[0].x-arr[1].x)*(arr[0].y-arr[1].y)));
		}else{
			for(int i=0;i<n;i++)
				for(int j=+1;j<n;j++)
					if(arr[i].x!=arr[j].x&&arr[i].y!=arr[j].y){
						System.out.println(Math.abs((arr[i].x-arr[j].x)*(arr[i].y-arr[j].y)));
						return;
					}
		}
	}
	static class FastScanner{
		BufferedReader br;
		StringTokenizer st;
		public FastScanner(){br=new BufferedReader(new InputStreamReader(System.in));}
		String nextToken(){
			while(st==null||!st.hasMoreElements())
				try{st=new StringTokenizer(br.readLine());}catch(Exception e){}
			return st.nextToken();
		}
		int nextInt(){return Integer.parseInt(nextToken());}
		long nextLong(){return Long.parseLong(nextToken());}
		double nextDouble(){return Double.parseDouble(nextToken());}
	}
}

//package codeforces;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;

public class Pasha {

	private static StringTokenizer st;

	public static void nextLine(BufferedReader br) throws IOException {
		st = new StringTokenizer(br.readLine());
	}

	public static int nextInt(){
		return Integer.parseInt(st.nextToken());
	}
	public static String next(){
		return st.nextToken();
	}
	public static long nextLong(){
		return Long.parseLong(st.nextToken());
	}
	public static double nextDouble(){
		return Double.parseDouble(st.nextToken());
	}

	public static void main(String [] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		nextLine(br);

		int n = nextInt();
		if (n < 2){
			System.out.println(-1);
		}
		nextLine(br);
		if (n > 2){

			int x1 = nextInt();
			int y1 = nextInt();
			nextLine(br);
			int x2 = nextInt();
			int y2 = nextInt();
			nextLine(br);
			int x3 = nextInt();
			int y3 = nextInt();

			int dx = Math.max(Math.abs(x1-x2), Math.abs(x3-x1));
			int dy = Math.max(Math.abs(y1-y2), Math.abs(y3-y1));

			if ( n == 4){
				nextLine(br);
				int x4 = nextInt();
				int y4 = nextInt();
			}
			System.out.println(dx*dy);

		}

		if (n == 2){
			//nextLine(br);
			int x = nextInt();
			int y = nextInt();
			nextLine(br);
			int x1 = nextInt();
			int y1 = nextInt();

			if (x==x1 || y==y1){
				System.out.println(-1);
			} else {
				System.out.println(Math.abs(x1-x)* Math.abs(y1-y));
			}

		}

	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.Set;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.TreeSet;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author I_love_PloadyFree
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskA {
		public void solve(int testNumber, InputReader in, OutputWriter out) {
			int n = in.readInt();

			Set<Integer> xs = new TreeSet<>();
			Set<Integer> ys = new TreeSet<>();

			for (int i = 0; i < n; i++) {
				xs.add(in.readInt());
				ys.add(in.readInt());
			}

			if (xs.size() < 2 || ys.size() < 2) {
				out.print(-1);
				return;
			}

			Iterator<Integer> xsi = xs.iterator();
			Iterator<Integer> ysi = ys.iterator();

			out.print((xsi.next() - xsi.next()) * (ysi.next() - ysi.next()));
		}

	}

	static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

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

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

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

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return isWhitespace(c);
		}

		public static boolean isWhitespace(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

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

		}

	}

	static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void close() {
			writer.close();
		}

		public void print(int i) {
			writer.print(i);
		}

	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.Set;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.List;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author I_love_PloadyFree
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskA {
		public void solve(int testNumber, InputReader in, OutputWriter out) {
			int n = in.readInt();

			Set<Integer> xs = new TreeSet<>();
			Set<Integer> ys = new TreeSet<>();

			for (int i = 0; i < n; i++) {
				xs.add(in.readInt());
				ys.add(in.readInt());
			}

			if (xs.size() < 2 || ys.size() < 2) {
				out.print(-1);
				return;
			}

			int x1, y1;
			int x2, y2;

			List<Integer> xs1 = new ArrayList<>(xs);
			List<Integer> ys1 = new ArrayList<>(ys);

			x1 = xs1.get(0);
			y1 = ys1.get(0);
			x2 = xs1.get(1);
			y2 = ys1.get(1);

			out.print((x2 - x1) * (y2 - y1));
		}

	}

	static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

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

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

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

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return isWhitespace(c);
		}

		public static boolean isWhitespace(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

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

		}

	}

	static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void close() {
			writer.close();
		}

		public void print(int i) {
			writer.print(i);
		}

	}
}

import java.util.Arrays;
import java.util.Scanner;

public class MainA {
	MyScanner sc = new MyScanner();
	Scanner sc2 = new Scanner(System.in);
	long start = System.currentTimeMillis();
	long fin = System.currentTimeMillis();
	final int MOD = 1000000007;
	int[] dx = { 1, 0, 0, -1 };
	int[] dy = { 0, 1, -1, 0 };

	void run() {
		int n = sc.nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		for (int i = 0; i < n; i++) {
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
		}
		int res = -1;
		if (n == 1) {
			res = -1;
		} else if (n == 2) {
			if (x[0] != x[1] && y[0] != y[1]) {
				res = Math.abs(x[0] - x[1]) * Math.abs(y[0] - y[1]);
			} else {
				res = -1;
			}
		} else if (n == 3) {
			boolean ok = false;
			for (int i = 0; i < n; i++) {
				for (int j = i + 1; j < n; j++) {
					if (x[i] != x[j] && y[i] != y[j]) {
						ok = true;
						res = Math.abs(x[i] - x[j]) * Math.abs(y[i] - y[j]);
					}
				}
			}
			if (!ok) {
				int xx = 0;
				int yy = 0;
				for (int i = 0; i < n; i++) {
					for (int j = i + 1; j < n; j++) {
						if (x[i] != x[j]) {
							xx = Math.abs(x[i] - x[j]);
						}
						if (y[i] != y[j]) {
							yy = Math.abs(y[i] - y[j]);
						}
					}
				}
				res = xx * yy;
			}
		} else {
			for (int i = 0; i < n; i++) {
				for (int j = i + 1; j < n; j++) {
					if (x[i] != x[j] && y[i] != y[j]) {
						res = Math.abs(x[i] - x[j]) * Math.abs(y[i] - y[j]);
					}
				}
			}

		}
		System.out.println(res);
	}

	public static void main(String[] args) {
		new MainA().run();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	void debug2(char[][] array) {
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				System.out.print(array[i][j]);
			}
			System.out.println();
		}
	}

	boolean inner(int h, int w, int limH, int limW) {
		return 0 <= h && h < limH && 0 <= w && w < limW;
	}

	void swap(int[] x, int a, int b) {
		int tmp = x[a];
		x[a] = x[b];
		x[b] = tmp;
	}

	// find minimum i (k <= a[i])
	int lower_bound(int a[], int k) {
		int l = -1;
		int r = a.length;
		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (k <= a[mid])
				r = mid;
			else
				l = mid;
		}
		// r = l + 1
		return r;
	}

	// find minimum i (k < a[i])
	int upper_bound(int a[], int k) {
		int l = -1;
		int r = a.length;
		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (k < a[mid])
				r = mid;
			else
				l = mid;
		}
		// r = l + 1
		return r;
	}

	long gcd(long a, long b) {
		return a % b == 0 ? b : gcd(b, a % b);
	}

	long lcm(long a, long b) {
		return a * b / gcd(a, b);
	}

	boolean palindrome(String s) {
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - 1 - i)) {
				return false;
			}
		}
		return true;
	}

	class MyScanner {
		int nextInt() {
			try {
				int c = System.in.read();
				while (c != '-' && (c < '0' || '9' < c))
					c = System.in.read();
				if (c == '-')
					return -nextInt();
				int res = 0;
				do {
					res *= 10;
					res += c - '0';
					c = System.in.read();
				} while ('0' <= c && c <= '9');
				return res;
			} catch (Exception e) {
				return -1;
			}
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		String next() {
			try {
				StringBuilder res = new StringBuilder("");
				int c = System.in.read();
				while (Character.isWhitespace(c))
					c = System.in.read();
				do {
					res.append((char) c);
				} while (!Character.isWhitespace(c = System.in.read()));
				return res.toString();
			} catch (Exception e) {
				return null;
			}
		}

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

		int[][] nextInt2dArray(int n, int m) {
			int[][] in = new int[n][m];
			for (int i = 0; i < n; i++) {
				in[i] = nextIntArray(m);
			}
			return in;
		}

		double[] nextDoubleArray(int n) {
			double[] in = new double[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextDouble();
			}
			return in;
		}

		long[] nextLongArray(int n) {
			long[] in = new long[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextLong();
			}
			return in;
		}

		char[][] nextCharField(int n, int m) {
			char[][] in = new char[n][m];
			for (int i = 0; i < n; i++) {
				String s = sc.next();
				for (int j = 0; j < m; j++) {
					in[i][j] = s.charAt(j);
				}
			}
			return in;
		}
	}
}

import java.util.*;
import java.io.*;

/* Mighty Cohadar */
public class A {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		if (n == 1) {
			System.out.println("-1");
			return;
		}
		int dx = 0;
		int dy = 0;
		int ax = scanner.nextInt();
		int ay = scanner.nextInt();
		for (int i = 1; i < n; i++) {
			int bx = scanner.nextInt();
			int by = scanner.nextInt();
			dx = Math.max(dx, Math.abs(ax - bx));
			dy = Math.max(dy, Math.abs(ay - by));
			ax = bx;
			ay = by;
		}
		int area = dx * dy;
		System.out.println((area == 0) ? -1 : area);
	}

}

import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        TaskA solver = new TaskA();
        solver.solve(in, out);

        out.close();
    }
}

class TaskA {
    final long MOD = (long) 1e9 + 7;
    final int MAXN = 5000001;

    public void solve(InputReader in, PrintWriter out) throws IOException {
        int n = in.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];

        for (int i = 0; i < n; i++) {
            x[i] = in.nextInt();
            y[i] = in.nextInt();
        }
        int ans = -1;
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                if (x[i] != x[j] && y[i] != y[j]) {
                    out.println(Math.abs(x[i] - x[j]) * Math.abs(y[i] - y[j]));
                    return;
                }
            }
        }
        out.println(ans);
    }
}

class InputReader {
    StringTokenizer st;
    BufferedReader reader;
    String token;

    public InputReader(InputStream stream) {
        st = null;
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.Point;

public class Div2_331_A {
    public static void main(String[] args) throws IOException {
        BufferedInputStream bis = new BufferedInputStream(System.in);
        Scanner sc = new Scanner(bis);
        int n = sc.nextInt();
        Point [] points = new Point[n];
        for (int i = 0; i < points.length; i++) {
            points[i] = new Point(sc.nextInt(), sc.nextInt());
        }
        Comparator<Point> comp = new Comparator<Point>() {
            public int compare(Point a, Point b) {
                if(a.x != b.x)
                    return a.x-b.x;
                return a.y-b.y;
            }
        };
        Arrays.sort(points, comp);
        if(n == 1)System.out.println(-1);
        else if(n == 2) {
            if(points[0].x != points[1].x && points[0].y != points[1].y) {
                int area = (int)(Math.abs(points[0].x-points[1].x)*Math.abs(points[0].y-points[1].y));
                System.out.println(area);
            } else
                System.out.println(-1);
        }else {
            Point end = (n==4)?points[3]:null;
            Point start = (n==4)?points[0]:null;
            if(n == 3) {
                if(points[0].x == points[1].x) {
                    start = points[0];
                    end = new Point(points[2].x, points[1].y);
                }   else if(points[1].x == points[2].x) {
                    start = new Point(points[0].x, points[1].y);
                    end = points[2];
                }
            }
            int area = (int)(Math.abs(start.x-end.x)*Math.abs(start.y-end.y));
            System.out.println(area);
        }
    }
}

import java.util.*;
public class WilburAndSwimmingPool {

	public static void main(String[] args) {
		Scanner input = new Scanner (System.in);
		int n = input.nextInt();
		if (n == 1){
			System.out.print(-1);
		}
		else {
		int[][] point = new int [n][2];
		for (int i = 0 ; i < n ; i++){
			point[i][0] = input.nextInt();
			point[i][1] = input.nextInt();
		}
		if (n == 2){
			if (point[0][0] == point[1][0] || point[0][1] == point[1][1]){
				System.out.println(-1);
			}
			else {
				System.out.println(Math.abs((point[1][0]-point[0][0])*(point[1][1]-point[0][1])));
			}
		}
		else {
			boolean flag = false;
			for (int i = 0 ; i < 3; i++){
				for (int j = 1 ; j < 3 ; j++){
					if (point[i][0] != point[j][0] && point[i][1] != point[j][1]){
						System.out.print(Math.abs((point[i][0]-point[j][0])*(point[i][1]-point[j][1])));
						flag = true;
						break;
					}
				}
				if (flag){break;}
			}
		}

	}

	}

}

import java.util.Scanner;
public class A
{
    public int calc(int x1,int y1,int x2,int y2)
    {
        return Math.abs((x1 - x2)) * Math.abs((y1 - y2));
    }
    public void solve()
    {
        Scanner cin = new Scanner(System.in);
        int n = cin.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];

        for(int i = 0;i < n;i++)
        {
            x[i] = cin.nextInt();
            y[i] = cin.nextInt();
        }
        int ans = -1;
        if(n == 2)
        {
            if(x[0] != x[1] && y[0] != y[1])
            {
                ans = calc(x[0],y[0],x[1],y[1]);
            }
        }else if(n == 3)
        {
            if(x[0] != x[1] && y[0] != y[1])
            {
                ans = calc(x[0],y[0],x[1],y[1]);
            }else if(x[0] != x[2] && y[0] != y[2])
            {
                ans = calc(x[0],y[0],x[2],y[2]);
            }else
            {
                ans = calc(x[1],y[1],x[2],y[2]);
            }
        }else if(n == 4)
        {
            if(x[0] != x[1] && y[0] != y[1])
            {
                ans = calc(x[0],y[0],x[1],y[1]);
            }else if(x[0] != x[2] && y[0] != y[2])
            {
                ans = calc(x[0],y[0],x[2],y[2]);
            }else if(x[0] != x[3] && y[0] != y[3])
            {
                ans = calc(x[0],y[0],x[3],y[3]);
            }
        }
        System.out.println(ans);
    }
    public static void main(String[] args)
    {
        new A().solve();
    }
}

import java.util.Scanner;

import static java.lang.System.exit;

/**
 * Created by Dmitry on 15.11.2015.
 */
public class main_1 {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        int n = reader.nextInt();
        int mas[][]=new int[2][n];
        if(n<=1){
            System.out.println("-1");
            exit(0);
        }else{
            for(int i =0;i<n;i++){
                mas[0][i]=reader.nextInt();
                mas[1][i]=reader.nextInt();
            }
            int a=0,b=0;
            for(int i =0;i<n;i++){
                for(int j=i;j<n;j++) {
                    if (!(mas[0][i] == mas[0][j])){
                        a=Math.abs(mas[0][i]-mas[0][j]);
                    }
                    if(!(mas[1][i] == mas[1][j])){
                        b=Math.abs(mas[1][i]-mas[1][j]);
                    }
                }
            }
            if(a*b==0){
                System.out.println("-1");
            }else{
                System.out.println(a*b);
            }
        }
    }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.util.Arrays;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author zodiacLeo
 */
public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA
    {
        public void solve(int testNumber, FastScanner in, FastPrinter out)
        {
            int n = in.nextInt();
            if (n == 1)
            {
                out.println(-1);
                return;
            }
            if (n == 2)
            {
                int x1 = in.nextInt();
                int y1 = in.nextInt();

                int x2 = in.nextInt();
                int y2 = in.nextInt();

                if ((x1 == x2 && y1 != y2) || (x1 != x2 && y1 == y2))
                {
                    out.println(-1);
                    return;
                }
                int deltaX = Math.abs(x1 - x2);
                int deltaY = Math.abs(y1 - y2);
                out.println(deltaX * 1l * deltaY);
                return;
            }

            Point[] p = new Point[n];
            for (int i = 0; i < n; i++)
            {
                int x = in.nextInt();
                int y = in.nextInt();
                p[i] = new Point(x, y);
            }
            Arrays.sort(p);

            if (n == 3)
            {
                for (int i = 0; i < 3; i++)
                {
                    for (int j = 0; j < 3; j++)
                    {
                        if (i != j)
                        {
                            int xDiff = Math.abs(p[i].x - p[j].x);
                            for (int k = 0; k < 3 && xDiff > 0; k++)
                            {
                                if (k != i && k != j)
                                {
                                    int yDiff = Math.abs(p[j].y - p[k].y);
                                    if (yDiff > 0)
                                    {
                                        out.println(xDiff * 1l * yDiff);
                                        return;
                                    }
                                }
                            }
                        }
                    }
                }
                out.println(-1);
                return;
            }
            if (n == 4)
            {
                if (p[0].y == p[2].y && p[0].x == p[1].x)
                {
                    int deltaX = Math.abs(p[0].x - p[n - 1].x);
                    int deltaY = Math.abs(p[0].y - p[n - 1].y);
                    long a = deltaX * 1l * deltaY;
                    if (a > 0)
                    {
                        out.println(a);
                        return;
                    }
                    out.println(-1);
                } else
                {
                    out.println(-1);
                }
            }
        }

        class Point implements Comparable<Point>
        {
            int x;
            int y;

            public Point(int x, int y)
            {
                this.x = x;
                this.y = y;
            }

            public int compareTo(Point that)
            {
                int xDiff = Integer.compare(this.x, that.x);
                return xDiff != 0 ? xDiff : Integer.compare(this.y, that.y);
            }

        }

    }

    static class FastScanner
    {
        public BufferedReader br;
        public StringTokenizer st;

        public FastScanner(InputStream is)
        {
            br = new BufferedReader(new InputStreamReader(is));
        }

        public FastScanner(File f)
        {
            try
            {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e)
            {
                e.printStackTrace();
            }
        }

        public String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                String s = null;
                try
                {
                    s = br.readLine();
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

    }

    static class FastPrinter extends PrintWriter
    {
        public FastPrinter(OutputStream out)
        {
            super(out);
        }

        public FastPrinter(Writer out)
        {
            super(out);
        }

    }
}

import java.util.*;
import java.text.*;
import java.io.*;
import java.math.*;

public class Solution{
    public static void main (String args[]){
        Scanner in = new Scanner (System.in);
        int n = in.nextInt();
        int coords[][] = new int[n][2];

        for (int i=0;i<n;i++){
            coords[i][0]=in.nextInt();
            coords[i][1]=in.nextInt();
        }

        System.out.println(area(coords));
    }

    public static int area(int coords[][]){
        int x=Integer.MAX_VALUE;
        int y=Integer.MAX_VALUE;
        for (int i=1;i<coords.length;i++){
            if(coords[i][0]!=coords[0][0]) x = Math.abs(coords[i][0]-coords[0][0]);
            if(coords[i][1]!=coords[0][1]) y = Math.abs(coords[i][1]-coords[0][1]);
        }
        if (x!=Integer.MAX_VALUE && y!=Integer.MAX_VALUE) return x*y;
        else return -1;
    }

}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.Arrays;
 public class Maximum{

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));

        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

        public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }

        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }      //Fastscanner class end

   static FastScanner in=new FastScanner();
   static PrintWriter ww=new PrintWriter(new OutputStreamWriter(System.out));
   public static void main(String args[])throws IOException
   {
   //Main ob=new Main();
   Maximum ob=new Maximum();
   ob.solve();
   ww.close();
   }
   public void solve()throws IOException
   {
    int n=in.nextInt();
    int x[] = new int[n];
    int y[] = new int[n];
    int ans=0;
    int a=0,b=0,u=0,v=0;
    for(int i=0;i<n;i++)
    {
      x[i]=in.nextInt();
      y[i]=in.nextInt();
    }
    for(int i=0;i<n;i++)
    {
     for(int j=i+1;j<n;j++)
      {
        if(x[i]!=x[j])
        {
          a=x[i];b=x[j];
        }
        if(y[i]!=y[j])
        {
          u=y[i];
          v=y[j];
        }
      }
    }
    ans = Math.abs((a-b)*(u-v));
    if(ans==0)
        System.out.println("-1");
    else
        System.out.println(ans);
   }
  }

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int V = sc.nextInt();

		if(!(V > 1)){
			System.out.println(-1);
		}
		else if(V==2){
			int p1X = sc.nextInt();
			int p1Y = sc.nextInt();
			int p2X = sc.nextInt();
			int p2Y = sc.nextInt();
			if(p1X == p2X || p1Y == p2Y)
				System.out.println(-1);
			else{
				System.out.println(Math.abs(p1X-p2X)*Math.abs(p1Y-p2Y));
			}

		}

//		else if(V==3) { //find the diagonal one
//
//		}
		else {
//			int[] px = new int[V];
//			int[] py = new int[V];
//			for(int i=0; i<V; i++){
//				px[i]=sc.nextInt();
//				py[i]=sc.nextInt();
//			}
			//find diagonal points
			int p1X = sc.nextInt();
			int p1Y = sc.nextInt();
			int p2X = sc.nextInt();
			int p2Y = sc.nextInt();
			int p3X = sc.nextInt();
			int p3Y = sc.nextInt();

//			for(int i=2; i<2; i++){
//			System.out.println(p1X != p2X && p1Y != p2Y);
				if(!(p1X != p2X && p1Y != p2Y)){
					if(p1X != p3X && p1Y != p3Y){
						p2X = p3X;
						p2Y = p3Y;
					} else {
						p1X = p3X;
						p1Y = p3Y;
					}
				}
//			}
			System.out.println(Math.abs(p1X-p2X)*Math.abs(p1Y-p2Y));
	}
	}

}

import java.util.*;
public class Codef{
    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        int n=in.nextInt(),x,y,a,b;
        int[][] ar=new int[n][2];
        for (int i=0; i<n; i++){
            ar[i][0]=in.nextInt();
            ar[i][1]=in.nextInt();
        }
        if ((n==1)||((n==2)&((ar[1][0]==ar[0][0])|(ar[1][1]==ar[0][1])))){
            System.out.println(-1);
            return;
        }
        for (int j=0; j<n; j++)
        for (int i=j+1; i<n; i++){
            if ((ar[j][0]!=ar[i][0])&(ar[j][1]!=ar[i][1])){
                System.out.println(Math.abs(ar[j][0]-ar[i][0])*Math.abs(ar[j][1]-ar[i][1]));
                return;
            }
        }
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.Random;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Task solver = new Task();
		solver.solve(1, in, out);
		out.close();
	}

	static class Task {

		public void solve(int testNumber, InputReader in, PrintWriter out) {
			int n = in.nextInt();

			int maxX = -1001;
			int minX = 1001;
			int maxY = -1001;
			int minY = 1001;

			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);

			}
			if(maxX == minX || maxY == minY) {
				out.println(-1);
				return;
			}

			out.println(Math.abs(maxX-minX)*Math.abs(maxY-minY));

		}

	}

	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer st;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.TreeSet;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Artyom Korzun
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.nextInt();
            TreeSet<Integer> x = new TreeSet<>();
            TreeSet<Integer> y = new TreeSet<>();

            for (int i = 0; i < n; i++) {
                x.add(in.nextInt());
                y.add(in.nextInt());
            }

            if (x.size() == 2 && y.size() == 2) {
                out.print((x.last() - x.first()) * (y.last() - y.first()));
            } else {
                out.print(-1);
            }
        }

    }

    static class FastScanner {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public FastScanner(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens())
                tokenizer = new StringTokenizer(nextLine());

            return tokenizer.nextToken();
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

    }
}

import java.util.HashSet;
import java.util.Scanner;
import java.util.TreeSet;
public class WilburSwim {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        TreeSet<Integer> x = new TreeSet<>();
        TreeSet<Integer> y = new TreeSet<>();
        for (int i=0; i<n; i++) {
            x.add(s.nextInt());
            y.add(s.nextInt());
        }
        if (x.size() != 2 || y.size() != 2) System.out.println("-1");
        else                                System.out.println((x.last() - x.first()) * (y.last() - y.first()));
    }

}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class Main
{

    public Main() throws Exception
    {

        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
                System.out));
        int n = Integer.parseInt(in.readLine());
        int arr[][]=new int[n][2];
        for(int i=0;i<n;i++)
        {
            String str[]=in.readLine().split(" ");
            arr[i][0]=Integer.parseInt(str[0]);
            arr[i][1]=Integer.parseInt(str[1]);
        }
        if(n==1) out.write("-1\n");
        else if(n==2)
        {
            int x=Math.abs(arr[0][0]-arr[1][0]);
            int y=Math.abs(arr[0][1]-arr[1][1]);
            if(x==0||y==0) out.write("-1\n");
            else out.write((x*y)+"\n");
        }
        else if(n==3)
        {
            int x=Math.max(Math.abs(arr[0][0]-arr[1][0]), Math.abs(arr[1][0]-arr[2][0]));
            int y=Math.max(Math.abs(arr[0][1]-arr[1][1]), Math.abs(arr[1][1]-arr[2][1]));
            out.write((x*y)+"\n");
        }
        else
        {
            int x=Math.max(Math.abs(arr[0][0]-arr[1][0]), Math.abs(arr[1][0]-arr[2][0]));
            int y=Math.max(Math.abs(arr[0][1]-arr[1][1]), Math.abs(arr[1][1]-arr[2][1]));
            out.write((x*y)+"\n");
        }
        out.flush();
    }

    public static void main(String args[]) throws Exception
    {
        new Main();
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class WilburandSwimmingPool {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader ( new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		if(n==1){
			System.out.println(-1);
			System.exit(0);
		}
		int [] x= new int [n];
		int [] y= new int [n];
		for(int i=0;i<n;i++){
			String temp[]= br.readLine().split(" ");
			x[i]=Integer.parseInt(temp[0]);
			y[i]=Integer.parseInt(temp[1]);
		}
		if(n==2){
			if(x[0]==x[1]||y[0]==y[1]){
				System.out.println(-1);
				System.exit(0);
			}
			int w = Math.abs(x[0]-x[1]);
			int h = Math.abs(y[0]-y[1]);
			System.out.println(w*h);
			System.exit(0);
		}
		if(n==3|| n==4){
			Arrays.sort(x);
			Arrays.sort(y);
			int w = x[n-1]-x[0];
			int h = y[n-1]-y[0];
			System.out.println(w*h);
			System.exit(0);
		}
	}

}

import java.io.*;
import java.util.*;
import java.nio.charset.StandardCharsets;
// import java.math.BigInteger;

public class A {
    static Writer wr;

    public static void main(String[] args) throws Exception {
        // long startTime = System.nanoTime();

        // String testString = "";
        // InputStream stream = new ByteArrayInputStream(testString.getBytes(StandardCharsets.UTF_8));
        // Reader in = new Reader(stream);

        Reader in = new Reader();
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

        wr = new Writer();

        /* Precomputation */

        // long elapsedTime = System.nanoTime() - startTime;
        // double seconds = (double)elapsedTime / 1000000000.0;
        // wr.writeRedLn(seconds);

        /* Input */
        int N = in.nextInt();

        int area = -1;

        if(N==1) {
            in.nextInt(); in.nextInt();
            area = -1;
        }
        else if(N>1) {
            int x = in.nextInt(); int y = in.nextInt();

            int x1=0, y1=0;

            area = -1;
            int cc=0;
            for(int i=0;i<N-1;i++) {
                int a = in.nextInt();
                int b = in.nextInt();
                if(x==a) {
                    y1 = b;
                    cc++;
                }
                else if(y==b) {
                    x1 = a;
                    cc++;
                }
                else if(x!=a && y!=b) {
                    x1 = a;
                    y1 = b;
                    cc=2;
                }

                if(cc==2) {
                    area = Math.abs((y-y1)*(x-x1));
                    // break;
                }
            }
        }

        out.write(area + "\n");

        out.flush();
    }
}

class Writer {
    public void writeRedLn(Object x) { writeRedLn(x+""); }
    public void writeBlueLn(Object x) { writeBlueLn(x+""); }
    public void writeGreenLn(Object x) { writeGreenLn(x+""); }
    public void writePinkLn(Object x) { writePinkLn(x+""); }
    public void writeRedLn(String x) { System.out.println((char)27 + "[31m" + (char)27 + "[40m" + x + (char)27 + "[0m"); }
    public void writeBlueLn(String x) { System.out.println((char)27 + "[34m" + (char)27 + "[3m" + x + (char)27 + "[0m"); }
    public void writeGreenLn(String x) { System.out.println((char)27 + "[32m" + (char)27 + "[3m" + x + (char)27 + "[0m"); }
    public void writePinkLn(String x) { System.out.println((char)27 + "[30m" + (char)27 + "[45m" + x + (char)27 + "[0m"); }
    public void writeRed(String x) { System.out.print((char)27 + "[31m" + (char)27 + "[40m" + x + (char)27 + "[0m"); }
    public void writeBlue(String x) { System.out.print((char)27 + "[34m" + (char)27 + "[3m" + x + (char)27 + "[0m"); }
    public void writeGreen(String x) { System.out.print((char)27 + "[32m" + (char)27 + "[3m" + x + (char)27 + "[0m"); }
    public void writePink(String x) { System.out.print((char)27 + "[30m" + (char)27 + "[45m" + x + (char)27 + "[0m"); }
}

class Reader {
    final private int BUFFER_SIZE = 1 << 16;private DataInputStream din;private byte[] buffer;private int bufferPointer, bytesRead;
    public Reader(){din=new DataInputStream(System.in);buffer=new byte[BUFFER_SIZE];bufferPointer=bytesRead=0;}
    public Reader(InputStream stream){din=new DataInputStream(stream);buffer=new byte[BUFFER_SIZE];bufferPointer=bytesRead=0;}
    public String readLine()throws IOException{byte[] buf=new byte[1024];int cnt=0,c;
        while((c=read())!=-1){if(c=='\n')break;buf[cnt++]=(byte)c;}return new String(buf,0,cnt);}
    public char nextChar()throws IOException{byte c=read();while(c<=' ')c=read();return (char)c;}
    public int nextInt()throws IOException{int ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');
        if(neg)c=read();do{ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;}
    public long nextLong()throws IOException{long ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');
        if(neg)c=read();do{ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;}
    public double nextDouble()throws IOException{double ret=0,div=1;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c = read();do {ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');
        if(c=='.')while((c=read())>='0'&&c<='9')ret+=(c-'0')/(div*=10);if(neg)return -ret;return ret;}
    private void fillBuffer()throws IOException{bytesRead=din.read(buffer,bufferPointer=0,BUFFER_SIZE);if(bytesRead==-1)buffer[0]=-1;}
    private byte read()throws IOException{if(bufferPointer==bytesRead)fillBuffer();return buffer[bufferPointer++];}
    public void close()throws IOException{if(din==null) return;din.close();}
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by peacefrog on 11/15/15.
 * Time : 10:33 PM
 */

public class Task_A {
	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	PrintWriter out;
	long timeBegin, timeEnd;

	public void runIO() throws IOException {
		timeBegin = System.currentTimeMillis();

		InputStream inputStream;
		OutputStream outputStream;

		if (ONLINE_JUDGE) {
			inputStream = System.in;
			Reader.init(inputStream);
			outputStream = System.out;

			out = new PrintWriter(outputStream);

		} else {
			inputStream = new FileInputStream("/home/peacefrog/Dropbox/IdeaProjects/Problem Solving/input");
			Reader.init(inputStream);
			out = new PrintWriter("output.txt");
		}

		solve();

		out.flush();
		out.close();
		timeEnd = System.currentTimeMillis();

		System.err.println("Time = " + (timeEnd - timeBegin));

	}

	/*
	 * Start Solution Here
	 */

	private void solve() throws IOException {
		int n = Reader.nextInt(); //This Variable default in Code Templete
		int[]x = new int[4];
		int y [] = new int[4];

		if(n==1) {
			x[0] = Reader.nextInt();
			y[0] = Reader.nextInt();
			System.out.println(-1);
			return;
		}
		if(n==2)
		{
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				y[i] = Reader.nextInt();
			}
			if(x[0]==x[1] || y[0]==y[1])
			{
				System.out.println(-1);
				return;
			}
			x[2] = x[1];
			y[2] = y[0];

			int len1 = x[2] -x[0] ;
			int len2 = y[2] -y[1];
			int area = len1 * len2 ;
			if(area !=0)
				System.out.println(Math.abs(area));
			else System.out.println(-1);

		}else {
			int minX = 1000;
			int minY = 1000;

			int maxX = -1000;
			int maxY = -1000;
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				y[i] = Reader.nextInt();
			}
			for (int i = 0; i < n; i++) {
				minX = Math.min(minX, x[i]);
				minY = Math.min(minY, y[i]);

				maxX = Math.max(maxX, x[i]);
				maxY = Math.max(maxY, y[i]);
			}

			System.out.println(Math.abs(maxX - minX) * Math.abs(maxY - minY));
		}

	}

	public static void main(String[] args) throws IOException {

		new Task_A().runIO();
	}

	static class Reader {
		static BufferedReader reader;
		static StringTokenizer tokenizer;

		/**
		 * call this method to initialize reader for InputStream
		 */
		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer("");
		}

		/**
		 * get next word
		 */
		static String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		static String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return "";
		}

		static int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		static long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		static double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A331 {

	public static void main(String[] args) throws IOException {
		   BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		    String in = input.readLine();
		    String[] init = in.split(" ");
		    int a = Integer.parseInt(init[0]);

		    if (a == 1){
		    	System.out.println(-1);
		    	return;
		    }

		    int maxX = Integer.MIN_VALUE;
		    int maxY = Integer.MIN_VALUE;
		    int minX = Integer.MAX_VALUE;
		    int minY = Integer.MAX_VALUE;
		    for(int i = 0; i < a; i++){
		    	in = input.readLine();
		    	init = in.split(" ");
		    	maxX = Math.max(maxX, Integer.parseInt(init[0]));
		    	minX = Math.min(minX, Integer.parseInt(init[0]));
		    	maxY = Math.max(maxY, Integer.parseInt(init[1]));
		    	minY = Math.min(minY, Integer.parseInt(init[1]));
		    }

		    if(maxX == minX){
		    	System.out.println(-1);
		    	return;
		    }
		    if(maxY == minY){
		    	System.out.println(-1);
		    	return;
		    }

		    System.out.println((maxX - minX) * (maxY - minY));
	}

}

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class A
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);

		int n = Integer.parseInt(br.readLine());
		int[][] R = new int[n][2];

		int area = -1;
		for (int i = 0; i < n; ++i) {
		    StringTokenizer st = new StringTokenizer(br.readLine());
		    int x = Integer.parseInt(st.nextToken());
		    int y = Integer.parseInt(st.nextToken());
		    for (int j = 0; j < i; ++j) {
		        if (R[j][0] != x && R[j][1] != y) {
		            area = Math.abs(x-R[j][0])*Math.abs(y-R[j][1]);
		            break;
		        }
		    }
		    R[i][0] = x;
		    R[i][1] = y;
		}

		System.out.println(area);
		System.exit(0);
	}
}

import java.io.*;
import java.util.*;

public class Main {
	public static void main (String [] args) throws IOException {
		OutputWriter outputWriter = new OutputWriter();

		// InputReader in = new InputReader("A.in"); PrintWriter out = outputWriter.getOutputWriter("A.out");
		InputReader in = new InputReader(System.in); PrintWriter out = outputWriter.getOutputWriter(System.out);
		int n = in.nextInt();
		int maxx = -10000000;
		int minx = 10000000;
		int maxy = -10000000;
		int miny = 10000000;
		int [] xx = new int[4];
		int [] yy = new int[4];
		for(int i = 0; i < n; ++i){
			int x = in.nextInt();
			int y = in.nextInt();
			xx[i] = x;
			yy[i] = y;
			maxy = Math.max(maxy, y);
			miny = Math.min(miny, y);
			maxx = Math.max(maxx, x);
			minx = Math.min(minx, x);
		}
		int x = maxx - minx;
		int y = maxy - miny;
		int ans = -1;
		if(x * y > 0) ans = 1;
		else ans = -1;

		if(ans == 1 && n > 2){
			if(n == 3) {
				if(xx[0] != xx[1] && xx[1] != xx[2] && xx[0] != xx[2]) ans = -1;
				if(yy[0] != yy[1] && yy[1] != yy[2] && yy[0] != yy[2]) ans = -1;
			}
			else {
				// bubble sort
				for(int i = 0; i< 4; ++i){
					for(int j = 0; j < 3; ++j){
						if(xx[j] > xx[j+1] || (xx[j] == xx[j+1] && yy[j] > yy[j+1])) {
							int t = xx[j];
							xx[j] = xx[j+1];
							xx[j+1] = t;
							t = yy[j];
							yy[j] = yy[j+1];
							yy[j+1] = t;
						}
					}
				}

				if(xx[0] != xx[1] || xx[2] != xx[3]) ans = -1;
				if(yy[0] != yy[2] || yy[1] != yy[3]) ans = -1;
			}
		}
		if(ans == 1) ans = x * y;
		out.println(ans);
		out.close();
		System.exit(0);
	}

	static class InputReader
	{
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream inputStream)
		{
			reader = new BufferedReader(new InputStreamReader(inputStream));
			tokenizer = null;
		}

		public InputReader(String inputFile) throws FileNotFoundException
		{
			reader = new BufferedReader(new FileReader(inputFile));
			tokenizer = null;
		}

		public String nextLine()
		{
			String curr = "";
			try {
				curr = reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
			return curr;
		}

		public String nextString()
		{
			while(tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(nextLine());
				} catch (Exception e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt()
		{
			return Integer.parseInt(nextString());
		}

		public long nextLong()
		{
			return Long.parseLong(nextString());
		}

		public double nextDouble(){
			return Double.parseDouble(nextString());
		}
	}

	static class OutputWriter
	{
		public PrintWriter getOutputWriter(String outputFile) throws IOException
		{
			return new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
		}
		public PrintWriter getOutputWriter(OutputStream outputStream) throws IOException
		{
			return new PrintWriter(new OutputStreamWriter(outputStream));
		}
	}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Div331A {
    public static void main(String[] args) throws Exception {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(bf.readLine());
        String[] l;
        if (n == 1) {
            System.out.println(-1);
            return;
        } else if (n == 2) {
            l = bf.readLine().split(" ");
            int x1 = Integer.parseInt(l[0]);
            int y1 = Integer.parseInt(l[1]);
            l = bf.readLine().split(" ");
            int x2 = Integer.parseInt(l[0]);
            int y2 = Integer.parseInt(l[1]);
            int ans = checkValid(x1, x2, y1, y2);
            System.out.println(ans);
            return;
        }
        int[][] arr = new int[2][n];
        for (int i = 0; i < n; i++) {
            l = bf.readLine().split(" ");
            arr[0][i] = Integer.parseInt(l[0]);
            arr[1][i] = Integer.parseInt(l[1]);
        }
        int a = 0;
        int b = 0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                a = Math.max(a, Math.abs(arr[0][i] - arr[0][j]));
                b = Math.max(b, Math.abs(arr[1][i] - arr[1][j]));
            }
        }
        System.out.println(a * b);
    }

    private static int checkValid(int x1, int x2, int y1, int y2) {
        if (x1 == x2 || y2 == y1) {
            return -1;
        } else {
            int a = Math.abs(x1 - x2);
            int b = Math.abs(y1 - y2);
            return a * b;
        }
    }
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class prob {

    public static void main(String[] args) throws Exception{
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(f.readLine());
        int N = Integer.parseInt(st.nextToken());
        int [][] arr = new int[2][N];
        if(N == 1){
            st = new StringTokenizer(f.readLine());
            int swag = Integer.parseInt(st.nextToken());
            swag = Integer.parseInt(st.nextToken());
            System.out.println("-1");
        }
        else{
            for(int x = 0; x < N; x++){
                st = new StringTokenizer(f.readLine());
                arr[0][x] = Integer.parseInt(st.nextToken());
                arr[1][x] = Integer.parseInt(st.nextToken());
            }
            int width = 0;
            int height = 0;
            if(N == 2 && (arr[0][0] != arr[0][1] && arr[1][0] != arr[1][1])){
                if(arr[0][0] < arr[0][1])
                    width = arr[0][1] - arr[0][0];
                else
                    width = arr[0][0] - arr[0][1];
                if(arr[1][0] < arr[1][1])
                    height = arr[1][1] - arr[1][0];
                else
                    height = arr[1][0] - arr[1][1];
                System.out.println(width*height);
            }
            else if(N != 2){
                for(int x = 0; x < N; x++){
                    for(int y = x + 1; y < N; y++){
                        if(arr[0][x] == arr[0][y]){
                            if(arr[1][x] < arr[1][y])
                                width = arr[1][y] - arr[1][x];
                            else
                                width = arr[1][x] - arr[1][y];
                        }
                        else if(arr[1][x] == arr[1][y]){
                            if(arr[0][x] < arr[0][y])
                                height = arr[0][y] - arr[0][x];
                            else
                                height = arr[0][x] - arr[0][y];
                        }
                    }
                }
                System.out.println(width*height);
            }
            else
                System.out.println("-1");
        }
    }

}

import java.util.Scanner;

public class Main {
    Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        new Main();
    }

    public Main() {
        new A().doIt();
    }
    class A{
        void doIt(){
            int n = sc.nextInt();
            int a = -1,b = -1,c = -1,d = -1;
            for(int i = 0;i < n;i++){
                int x = sc.nextInt() + 1000;
                int y = sc.nextInt() + 1000;
                if(i == 0){
                    a = x;
                    b = y;
                }else{
                    if(a != x)c = x;
                    if(b != y)d = y;
                }
            }
            if(a == -1 || b == -1 || c == -1 || d == -1)System.out.println(-1);
            else{
                if(a < c){
                    if(b < d)System.out.println((c-a)*(d-b));
                    else System.out.println((c-a)*(b-d));
                }else{
                    if(b < d)System.out.println((a-c)*(d-b));
                    else System.out.println((a-c)*(b-d));
                }
            }
        }
    }
}

//package sergiu.contests.codeforces.r331div2;

import static java.lang.System.out;

import java.util.Scanner;

public class A {
    static Scanner in;

    public static void main(String[] args) {
        in = new Scanner(System.in);
        int n = in.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];
        for (int i = 0; i < n; i++) {
            x[i] = in.nextInt();
            y[i] = in.nextInt();
        }
        for (int i = 0; i < n - 1; i++) {
            for (int j = i + 1; j < n; j++) {
                if (x[i] != x[j] && y[i] != y[j]) {
                    out.println(Math.abs(x[i] - x[j]) * Math.abs(y[i] - y[j]));
                    return;
                }
            }
        }
        out.println(-1);
    }
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import java.util.Scanner;

/**
 *
 * @author shaolin
 */
public class A_331 {
    public static void main (String[] args) {
        int n;
        int[] x;
        int[] y;
        int i;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        x = new int[n];
        y = new int[n];
        for(i=0;i<n;i++){
            x[i] = scanner.nextInt();
            y[i] = scanner.nextInt();
        }
        if(n==1) {
            System.out.println(-1);
        }
        else if(n==2) {
            if(x[0]!=x[1] && y[0]!=y[1]) {
                System.out.println(Math.abs(x[0]-x[1])*Math.abs(y[0]-y[1]));
            } else {
                System.out.println(-1);
            }
        }
        else if(n==3 || n==4) {
            if(x[0]!=x[1] && y[0]!=y[1]) {
                System.out.println(Math.abs(x[0]-x[1])*Math.abs(y[0]-y[1]));

            }
            else if(x[0]!=x[2] && y[0]!=y[2]) {
                System.out.println(Math.abs(x[0]-x[2])*Math.abs(y[0]-y[2]));
            }
            else if(x[1]!=x[2] && y[1]!=y[2]) {
                System.out.println(Math.abs(x[2]-x[1])*Math.abs(y[2]-y[1]));
            } else {
                System.out.println(-1);
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.Vector;

 public class a {

    public static void main(String[] args)throws java.lang.Exception {
	EScanner sc=new EScanner(System.in);
          PrintWriter bw = new PrintWriter(System.out);

         int n=sc.nextInt();
         int[]xx=new int[n];
         int[]yy=new int[n];
         boolean f=false;

        for (int i = 0; i < n; i++) {
            int x=sc.nextInt();
            int y=sc.nextInt();
            xx[i]=x;
            yy[i]=y;

        }

        for (int i = 0; i < n; i++) {
            int x=xx[i];
           int y=yy[i];

            for (int j = 0; j < n; j++) {
                if(i!=j)
                {
                    if(x!=xx[j]&&y!=yy[j])
                    {
                        System.out.println(Math.abs(x-xx[j])*Math.abs(y-yy[j]));
                        return;
                    }
                }
            }

        }

        System.out.println("-1");

 }

static class EScanner {
		BufferedReader br;
		StringTokenizer st;

		public EScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public EScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return null;
				st = new StringTokenizer(s);
			}
			return st.nextToken();
		}

		boolean hasMoreTokens() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return false;
				st = new StringTokenizer(s);
			}
			return true;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}
	}
 }

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

public class Main {
    static final String NON_CHARACTER = "[^a-zA-Z]+";
    static final double EPS = 1e-9;
    static final int[] BOX_X = {0,-1,1,0}; //{-1,0,1,-1,1,-1,0,1};
    static final int[] BOX_Y = {-1,0,0,1}; //{-1,-1,-1,0,0,1,1,1};
    static InputReader reader;
    static OutputWriter writer;

    public static void main(String[] args)  {
        reader = new InputReader(System.in);
        writer = new OutputWriter(System.out);

        int n = reader.nextInt();
        if(n == 1){
            writer.println("-1");
        }else if(n == 2){
            int x1 = reader.nextInt();
            int y1 = reader.nextInt();
            int x2 = reader.nextInt();
            int y2 = reader.nextInt();
            if(x1 != x2 && y1 != y2){
                writer.println("%d", Math.abs((x1-x2)*(y1-y2)));
            }else{
                writer.println("-1");
            }
        }else if(n >= 3){
            Point[] points = new Point[n];
            int x,y;
            for(int i=0; i<n; i++){
                x = reader.nextInt();
                y = reader.nextInt();
                points[i] = new Point(x, y);
            }
            Arrays.sort(points);
            if(n == 3){
                if(points[0].x == points[1].x && points[0].y != points[1].y){
                    writer.println("%d", Math.abs((points[2].x - points[0].x) * (points[1].y - points[0].y)));
                }else if(points[1].x == points[2].x && points[1].y != points[2].y){
                    writer.println("%d", Math.abs((points[1].x - points[0].x) * (points[2].y - points[1].y)));
                }else{
                    writer.println("-1");
                }
            }else{
                if (points[0].x == points[1].x && points[2].x == points[3].x && points[0].y == points[2].y && points[1].y == points[3].y){
                    writer.println("%d", Math.abs((points[2].x - points[0].x) * (points[1].y - points[0].y)));
                }else{
                    writer.println("-1");
                }
            }
        }
        writer.flush();
    }
    static class Point implements Comparable<Point>{
        int x; int y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Point o) {
            if(x == o.x){
                return y - o.y;
            }else{
                return x - o.x;
            }
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (Exception e) {
                    return null;
                }
            }
            return tokenizer.nextToken();
        }
        public char nextChar(){
            try {
                char c = '\0';
                while(c == '\0' || c == '\n' || c == '\r')
                    c = (char) reader.read();
                return c;
            }catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        public String nextLine(){
            if(tokenizer != null && tokenizer.hasMoreTokens()){
                StringBuilder sb = new StringBuilder(tokenizer.nextToken());
                while(tokenizer.hasMoreTokens()){
                    sb.append(" ").append(tokenizer.nextToken());
                }
                return sb.toString();
            }else{
                try {
                    return reader.readLine();
                }catch(Exception e){
                    return null;
                }
            }
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }

    static class OutputWriter {
        public BufferedWriter writer;
        OutputWriter(OutputStream stream) {
            writer = new BufferedWriter(new OutputStreamWriter(stream));
        }
        public void print(String string){
            try {
                writer.write(string, 0, string.length());
            }catch(Exception e){e.printStackTrace();}
        }
        public void print(char c){
            try {
                writer.write(c);
            }catch(Exception e){e.printStackTrace();}
        }
        public void print(String format, Object... args) {
            try {
                String string = String.format(format, args);
                writer.write(string, 0, string.length());
            }catch(Exception e){e.printStackTrace();}
        }
        public void print(int x){
            try {
                String string = String.format("%d", x);
                writer.write(string, 0, string.length());
            }catch(Exception e){e.printStackTrace();}
        }
        public void print(double x){
            try {
                int x_int = (int) (x * 100 + 1e-6); // add 1e-6 to avoid precision error when converting to int
                String string = String.format("%d.%02d", x_int/100, x_int%100);
                writer.write(string, 0, string.length());
            }catch(Exception e){e.printStackTrace();}
        }
        public void print(long x){
            try {
                String string = String.format("%d", x);
                writer.write(string, 0, string.length());
            }catch(Exception e){e.printStackTrace();}
        }
        public void println(String string){
            print(string);
            newline();
        }
        public void println(char c){
            print(c);
            newline();
        }
        public void println(String format, Object... args) {
            print(format, args);
            newline();
        }
        public void println(int x){
            print(x);
            newline();
        }
        public void println(long x){
            print(x);
            newline();
        }
        public void println(double x){
            print(x);
            newline();
        }
        public void println(){
            newline();
        }

        private void newline() {
            try {
                writer.newLine();
            }catch(Exception e){e.printStackTrace();}
        }
        private void flush(){
            try {
                writer.flush();
            }catch(Exception e){e.printStackTrace();}
        }
    }

    static class BitBoolean{
        final static int SIZE = 31;
        int[] bits;

        public BitBoolean(int size) {
            bits = new int[size/SIZE + 1];
        }

        public boolean equals(BitBoolean b){
            if (bits.length != b.bits.length)   return false;
            for (int i=0;i<bits.length;i++){
                if (bits[i] != b.bits[i])   return false;
            }
            return true;
        }

        public int set(int i, boolean b){
            return b ? setTrue(i) : setFalse(i);
        }
        public int setTrue(int i){
            return bits[i/SIZE] = BitBoolean.setBit(bits[i / SIZE], i % SIZE);
        }
        public int setFalse(int i){
            return bits[i/SIZE] = BitBoolean.clearBit(bits[i / SIZE], i % SIZE);
        }
        public boolean isTrue(int i){
            return BitBoolean.isOn(bits[i / SIZE], i%SIZE) > 0;
        }
        public int toggle(int i){
            return bits[i/SIZE] = BitBoolean.toggleBit(bits[i / SIZE], i % SIZE);
        }
        public void allTrue(){
            for (int i=0;i<bits.length;i++){
                bits[i] = BitBoolean.setAll(SIZE);
            }
        }
        public void allFalse(){
            for (int i=0;i<bits.length;i++){
                bits[i] = 0;
            }
        }

        static int setBit(int S, int j) { return S | (1 << j); }

        static int isOn(int S, int j) { return S & (1 << j); }

        static int clearBit(int S, int j) { return S & ~(1 << j); }

        static int toggleBit(int S, int j) { return S ^ (1 << j); }

        static int lowBit(int S) { return S & (-S); }

        static int setAll(int n) { return (1 << n) - 1; }

        static int modulo(int S, int N) { return ((S) & (N - 1)); } // returns S % N, where N is a power of 2

        static int isPowerOfTwo(int S) { return (S & (S - 1)) == 0 ? 1 : 0; }

        static int nearestPowerOfTwo(int S) { return ((int)Math.pow(2.0, (int)((Math.log((double)S) / Math.log(2.0)) + 0.5))); }

        static int turnOffLastBit(int S) { return ((S) & (S - 1)); }

        static int turnOnLastZero(int S) { return ((S) | (S + 1)); }

        static int turnOffLastConsecutiveBits(int S) { return ((S) & (S + 1)); }

        static int turnOnLastConsecutiveZeroes(int S) { return ((S) | (S - 1)); }

        static void printSet(int vS) {             // in binary representation
            System.out.printf("S = %2d = ", vS);
            Stack<Integer> st = new Stack<Integer>();
            while (vS > 0) {
                st.push(vS % 2);
                vS /= 2;
            }
            while (!st.empty()) {                          // to reverse the print order
                System.out.printf("%d", st.peek());
                st.pop();
            }
            System.out.printf("\n");
        }
    }

    /**
     * Permuatations
     */

    // simply prints all permutation - to see how it works
    private static void printPermutations( Comparable[] c ) {
        System.out.println( Arrays.toString( c ) );
        while ( ( c = nextPermutation( c ) ) != null ) {
            System.out.println( Arrays.toString( c ) );
        }
    }

    // modifies c to next permutation or returns null if such permutation does not exist
    private static Comparable[] nextPermutation( final Comparable[] c ) {
        // 1. finds the largest k, that c[k] < c[k+1]
        int first = getFirst( c );
        if ( first == -1 ) return null; // no greater permutation
        // 2. find last index toSwap, that c[k] < c[toSwap]
        int toSwap = c.length - 1;
        while ( c[ first ].compareTo( c[ toSwap ] ) >= 0 )
            --toSwap;
        // 3. swap elements with indexes first and last
        swap( c, first++, toSwap );
        // 4. reverse sequence from k+1 to n (inclusive)
        toSwap = c.length - 1;
        while ( first < toSwap )
            swap( c, first++, toSwap-- );
        return c;
    }

    // finds the largest k, that c[k] < c[k+1]
    // if no such k exists (there is not greater permutation), return -1
    private static int getFirst( final Comparable[] c ) {
        for ( int i = c.length - 2; i >= 0; --i )
            if ( c[ i ].compareTo( c[ i + 1 ] ) < 0 )
                return i;
        return -1;
    }

    // swaps two elements (with indexes i and j) in array
    private static void swap( final Comparable[] c, final int i, final int j ) {
        final Comparable tmp = c[ i ];
        c[ i ] = c[ j ];
        c[ j ] = tmp;
    }

    private static int length(long num){
        int count = 0;
        while(num > 0){
            count ++;
            num /= 10;
        }
        return count;
    }
    private static int length(int num){
        int count = 0;
        while(num > 0){
            count ++;
            num /= 10;
        }
        return count;
    }

    static abstract class Combination<T>{
        T[] array, a;
        int size, n;

        @SuppressWarnings("unchecked")
        public Combination(Class<T> c, T[] array, int size, int n) {
            this.array = array;
            this.size = size;
            this.n = n;
            a = (T[]) Array.newInstance(c, n);
        }
        public void generate(){
            g(array, a, 0, 0, n);
        }
        private void g(T[] set, T[] a, int i, int j, int n){
            if (i == n){
                solve(a);
                return;
            } else if(set.length - j < n - i){
                return;
            } else {
                for (int p = j; p < set.length; p++) {
                    a[i] = set[p];
                    g(set, a, i + 1, p + 1, n);
                }
            }
        }
        public abstract void solve(T[] a);
    }
    //    static class FenwickTree {
//        private Vector<Integer> ft;
//
//        private int LSOne(int S) { return (S & (-S)); }
//
//        public FenwickTree() {}
//
//        // initialization: n + 1 zeroes, ignore index 0
//        public FenwickTree(int n) {
//            ft = new Vector<Integer>();
//            for (int i = 0; i <= n; i++) ft.add(0);
//        }
//
//        public int rsq(int b) {                              // returns RSQ(1, b)
//            int sum = 0;
//            for (; b > 0; b -= LSOne(b)) sum += ft.get(b);
//            return sum;
//        }
//
//        public int rsq(int a, int b) {                       // returns RSQ(a, b)
//            return rsq(b) - (a == 1 ? 0 : rsq(a - 1)); }
//
//        // adjusts value of the k-th element by v (v can be +ve/inc or -ve/dec)
//        public void adjust(int k, int v) {                    // note: n = ft.size() - 1
//            for (; k < (int)ft.size(); k += LSOne(k))
//                ft.set(k, ft.get(k) + v);
//        }
//
//        public int readSingle(int idx){ //get single value at index idx
//            int sum = ft.get(idx); // sum will be decreased
//            if (idx > 0){ // special case
//                int z = idx - (idx & -idx); // make z first
//                idx--; // idx is no important any more, so instead y, you can use idx
//                while (idx != z){ // at some iteration idx (y) will become z
//                    sum -= ft.get(idx);
//                    idx -= (idx & -idx);
//                }
//            }
//            return sum;
//        }
//        public void scale(int c){   //scale all entry by a value
//            for(int i=0;i<ft.size();i++)
//                ft.set(i, ft.get(i) * c);
//        }
//        // if in tree exists more than one index with a same
//        // cumulative frequency, this procedure will return
//        // some of them (we do not know which one)
//        int find(int cumFre){
//            int idx = 0; //result of function
//            int bitMask = 1;
//            int f = ft.size();
//            while(f>1) {
//                f >>= 1;
//                bitMask <<= 1;
//            }
//            while ((bitMask != 0) && (idx < ft.size())){ // nobody likes overflow :)
//                int tIdx = idx + bitMask; // we make midpoint of interval
//                if (cumFre == ft.get(tIdx)) // if it is equal, we just return idx
//                    return tIdx;
//                else if (cumFre > ft.get(tIdx)){
//                    // if tree frequency "can fit" into cumFre,
//                    // then include it
//                    idx = tIdx; // update index
//                    cumFre -= ft.get(tIdx); // set frequency for next loop
//                }
//                bitMask >>= 1; // half current interval
//            }
//            if (cumFre != 0) // maybe given cumulative frequency doesn't exist
//                return -1;
//            else
//                return idx;
//        }
//    }
    public static class SuffixArray {
        private Suffix[] suffixes;

        /**
         * Initializes a suffix array for the given <tt>text</tt> string.
         * @param text the input string
         */
        public SuffixArray(String text) {
            int N = text.length();
            this.suffixes = new Suffix[N];
            for (int i = 0; i < N; i++)
                suffixes[i] = new Suffix(text, i);
            Arrays.sort(suffixes);
        }

        private static class Suffix implements Comparable<Suffix> {
            private final String text;
            private final int index;

            private Suffix(String text, int index) {
                this.text = text;
                this.index = index;
            }
            private int length() {
                return text.length() - index;
            }
            private char charAt(int i) {
                return text.charAt(index + i);
            }

            public int compareTo(Suffix that) {
                if (this == that) return 0;  // optimization
                int N = Math.min(this.length(), that.length());
                for (int i = 0; i < N; i++) {
                    if (this.charAt(i) < that.charAt(i)) return -1;
                    if (this.charAt(i) > that.charAt(i)) return +1;
                }
                return this.length() - that.length();
            }

            public String toString() {
                return text.substring(index);
            }
        }

        /**
         * Returns the length of the input string.
         * @return the length of the input string
         */
        public int length() {
            return suffixes.length;
        }

        /**
         * Returns the index into the original string of the ith smallest suffix.
         * That is, <tt>text.substring(sa.index(i))</tt> is the ith smallest suffix.
         * @param i an integer between 0 and N-1
         * @return the index into the original string of the ith smallest suffix
         * @throws java.lang.IndexOutOfBoundsException unless 0 ≤ i < N
         */
        public int index(int i) {
            if (i < 0 || i >= suffixes.length) throw new IndexOutOfBoundsException();
            return suffixes[i].index;
        }

        /**
         * Returns the length of the longest common prefix of the ith
         * smallest suffix and the i-1st smallest suffix.
         * @param i an integer between 1 and N-1
         * @return the length of the longest common prefix of the ith
         * smallest suffix and the i-1st smallest suffix.
         * @throws java.lang.IndexOutOfBoundsException unless 1 ≤ i < N
         */
        public int lcp(int i) {
            if (i < 1 || i >= suffixes.length) throw new IndexOutOfBoundsException();
            return lcp(suffixes[i], suffixes[i-1]);
        }

        // longest common prefix of s and t
        private static int lcp(Suffix s, Suffix t) {
            int N = Math.min(s.length(), t.length());
            for (int i = 0; i < N; i++) {
                if (s.charAt(i) != t.charAt(i)) return i;
            }
            return N;
        }

        /**
         * Returns the ith smallest suffix as a string.
         * @param i the index
         * @return the i smallest suffix as a string
         * @throws java.lang.IndexOutOfBoundsException unless 0 ≤ i < N
         */
        public String select(int i) {
            if (i < 0 || i >= suffixes.length) throw new IndexOutOfBoundsException();
            return suffixes[i].toString();
        }

        /**
         * Returns the number of suffixes strictly less than the <tt>query</tt> string.
         * We note that <tt>rank(select(i))</tt> equals <tt>i</tt> for each <tt>i</tt>
         * between 0 and N-1.
         * @param query the query string
         * @return the number of suffixes strictly less than <tt>query</tt>
         */
        public int rank(String query) {
            int lo = 0, hi = suffixes.length - 1;
            while (lo <= hi) {
                int mid = lo + (hi - lo) / 2;
                int cmp = compare(query, suffixes[mid]);
                if (cmp < 0) hi = mid - 1;
                else if (cmp > 0) lo = mid + 1;
                else return mid;
            }
            return lo;
        }

        // compare query string to suffix
        private static int compare(String query, Suffix suffix) {
            int N = Math.min(query.length(), suffix.length());
            for (int i = 0; i < N; i++) {
                if (query.charAt(i) < suffix.charAt(i)) return -1;
                if (query.charAt(i) > suffix.charAt(i)) return +1;
            }
            return query.length() - suffix.length();
        }
    }
}

import java.io.*;
import java.util.*;

public class R331qA {

	public static void main(String args[]) {
		InputReader in = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);

		int n = in.nextInt();

		TreeSet<Integer> x = new TreeSet<Integer>();
		TreeSet<Integer> y = new TreeSet<Integer>();

		for(int i=0;i<n;i++){
			x.add(in.nextInt());
			y.add(in.nextInt());
		}

		if(x.size() == 1 || y.size() == 1)
			w.println(-1);
		else{
			int x1 = x.first();
			x.remove(x1);
			int x2 = x.first();
			int y1 = y.first();
			y.remove(y1);
			int y2 = y.first();
			w.println((y2 - y1) * 1L * (x2 - x1) );
		}

		w.close();
	}

	static class Pair implements Comparable<Pair>{
		int x,y;
		Pair(int x,int y){
			this.x = x;
			this.y = y;
		}
		public int compareTo(Pair o){
			if(x != o.x)
				return Integer.compare(x, o.x);
			return Integer.compare(y, o.y);
		}
	}

	static class InputReader {
		private InputStream stream;		private byte[] buf = new byte[8192];
		private int curChar, snumChars;	private 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 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);}
	}
}

import java.util.Scanner;

public class Problema {

    public static Scanner lector = new Scanner(System.in);

    public static int llegir() {
        return lector.nextInt();
    }

    public static void main(String[] args) {
        int n = llegir();
        int xmin, ymin, xmax, ymax, y, x;
        xmax = xmin = llegir();
        ymax = ymin = llegir();
        for (int i = 1; i < n; ++i) {
            x = llegir();
            if (x > xmax) xmax = x;
            if (x < xmin) xmin = x;
            y = llegir();
            if (y > ymax) ymax = y;
            if (y < ymin) ymin = y;
        }
        int rectangle = (ymax - ymin) * (xmax - xmin);
        if (rectangle == 0) rectangle = -1;
        System.out.print(rectangle);
    }
}

//Wilbur swimming Pool
import java.util.*;
public class SwimPool
{	public static void main(String args[])
	{	int t, n, i, dx, dy;
		Set<Integer> x= new TreeSet<Integer>();
		Set<Integer> y= new TreeSet<Integer>();
		Scanner sc = new Scanner(System.in);
		n=sc.nextInt();
		if(n==1)
			System.out.println("-1");
		else
		{
			for(i=1;i<=n;i++)
			{	x.add(sc.nextInt());
				y.add(sc.nextInt());

			}
			if(x.size()<2||y.size()<2)
				System.out.println("-1");
			else
			{	Iterator<Integer> it= x.iterator();
				dx=Math.abs(it.next()-it.next());
				it=y.iterator();
				dy=Math.abs(it.next()-it.next());
				System.out.println(dx*dy);
			}
		}
	}
}

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;

public class A596{
  /* Title: Wilbur and Swimming Pool
   *
   * http://codeforces.com/problemset/problem/596/A
   *
   */
  public static void main(String args[]){
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();

    int area = 0;
    double slope = 0;
    ArrayList <List<Integer>> all = new ArrayList <List<Integer>> ();

    for (int i = 0; i < n; i++){
      int x = scanner.nextInt();
      int y = scanner.nextInt();
      List <Integer> coordinate = Arrays.asList(x, y);
      all.add(coordinate);
      if (i > 0){
        for(int j = 0; j < all.size(); j++){
          double delta_x = x - all.get(j).get(0);
          double delta_y = y - all.get(j).get(1);
          if (delta_x != 0){
            slope = delta_y / delta_x;
            if (slope != 0)
              area = (int) Math.abs(delta_x * delta_y);
          }
        }
      }
    }

    scanner.close();

    if (area == 0)
      System.out.println("-1");
    else
      System.out.println(area);

  }
}

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class a {
	public static int k;

	public static class node implements Comparable<node> {
		int x;
		int y;
		int pos;

		node(int x, int y, int pos) {
			this.x = x;
			this.y = y;
			this.pos = pos;
		}

		@Override
		public int compareTo(node o) {
			if (o.pos < pos)
				return 1;
			else if (o.pos > pos)
				return -1;
			return 0;
		}

	}

	public static class point {
		int x;
		int y;

		point(int x, int val) {
			this.x = x;
			this.y = val;
		}

	}

	public static BigInteger gcd(BigInteger a, BigInteger b) {
		if (b.equals(BigInteger.ZERO))
			return a;
		return gcd(b, a.mod(b));
	}

	public static long gcd1(long a, long b) {
		if (b == 0)
			return a;
		return gcd1(b, a % b);
	}

	public static ArrayList<Integer> prime;

	public static void sieve(int n) {
		boolean vis[] = new boolean[n + 5];
		vis[1] = true;
		vis[0] = true;
		for (int i = 2; i <= n; i++) {
			if (!vis[i]) {
				prime.add(i);
				for (long j = (long) i * (long) i; j <= n; j += i) {
					vis[(int) j] = true;
				}
			}
		}
	}

	public static int tree[][];
	public static boolean end[][];
	public static int counter;

	public static void trie(String a) {
		int st = 0;

		for (int i = 0; i < a.length(); i++) {
			if (tree[a.charAt(i) - 'a'][st] == 0) {
				tree[a.charAt(i) - 'a'][st] = counter++;
			}

			st = tree[a.charAt(i) - 'a'][st];
		}
		end[a.charAt(a.length() - 1) - 'a'][st] = true;

	}

	public static int seg[][];

	public static int get(int s, int e, int p, int from, int to, int seg[]) {
		if (s >= from && e <= to)
			return seg[p];
		if (s > to || e < from)
			return 0;
		int mid = (s + e) / 2;
		int one = get(s, mid, p * 2, from, to, seg);
		int two = get(mid + 1, e, p * 2 + 1, from, to, seg);
		return Math.max(one, two);
	}

	public static long comp(int n, int r) {
		long ans = 1;
		r = Math.min(r, n - r);
		for (int i = 1; i <= r; i++) {
			ans = ans * ((long) n - (long) i + 1L) / (long) i;
		}
		return ans;
	}

	public static ArrayList<Integer> arr[];
	public static boolean vis[];
	public static Stack<Integer> S;

	public static void bfs(int node) {
		for (int i = 0; i < arr[node].size(); i++) {
			int k = arr[node].get(i);
			if (vis[k] == false) {
				vis[k] = true;
				S.push(k);
				bfs(k);
			}
		}
		S.push(node);
	}

	public static void dfs(int node) {

		for (int i = 0; i < arr[node].size(); i++) {
			int k = arr[node].get(i);
			if (vis[k] == false) {
				vis[k] = true;
				dfs(k);
			}
		}
	}

	public static boolean chPrime(int r) {

		for (int i = 2; i * i <= r; i++) {
			if (r % i == 0)
				return false;
		}
		return true;
	}

	public static int len(long ai) {
		String temp = "" + ai;

		return temp.length();
	}

	public static int f_digit(long ai) {
		String temp = "" + ai;

		return (temp.charAt(0) - '0');

	}

	public static double cross(node a, node b) {

		return a.x * b.y - b.x * a.y;
	}

	public static double dot(node a, node b) {

		return a.x * b.x + a.y * b.y;
	}

	public static double sqrt(node a) {
		double e = Math.sqrt((double) a.x * (double) a.x + (double) a.y
				* (double) a.y);
		return e;
	}

	public static double theta(node a, node b) {

		// double theta = Math.atan2((double) Math.abs(cross(a, b)),
		// (double) dot(a, b));

		double theta = (double) Math.acos((double) dot(a, b)
				/ ((sqrt(a)) * sqrt(b)));
		return theta;
	}

	public static long mod = (long) Math.pow(10, 9) + 7;

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		// BufferedReader in = new BufferedReader(new FileReader("cubes.in"));
		// System.out.println(-70 % 3);
		StringBuilder qq = new StringBuilder();
		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));

		int n = Integer.parseInt(in.readLine());

		if (n == 1) {
			String y = in.readLine();
			System.out.println(-1);
			return;
		} else if (n == 2) {
			String y[] = in.readLine().split(" ");
			int x1 = Integer.parseInt(y[0]);
			int y1 = Integer.parseInt(y[1]);
			y = in.readLine().split(" ");
			int x2 = Integer.parseInt(y[0]);
			int y2 = Integer.parseInt(y[1]);
			if (x1 == x2 || y1 == y2) {
				System.out.println(-1);
				return;
			}
			System.out.println(Math.abs(x1 - x2) * Math.abs(y1 - y2));

		} else if (n == 3) {
			String y[] = in.readLine().split(" ");
			int x1 = Integer.parseInt(y[0]);
			int y1 = Integer.parseInt(y[1]);
			y = in.readLine().split(" ");
			int x2 = Integer.parseInt(y[0]);
			int y2 = Integer.parseInt(y[1]);
			y = in.readLine().split(" ");
			int x3 = Integer.parseInt(y[0]);
			int y3 = Integer.parseInt(y[1]);

			if (x1 != x2 && y1 != y2) {
				System.out.println(Math.abs(x1 - x2) * Math.abs(y1 - y2));
				return;
			}
			if (x1 != x3 && y1 != y3) {
				System.out.println(Math.abs(x1 - x3) * Math.abs(y1 - y3));
				return;
			}

			if (x2 != x3 && y2 != y3) {
				System.out.println(Math.abs(x2 - x3) * Math.abs(y3 - y2));
				return;
			}
			System.out.println(-1);
			return;

		} else {
			String y[] = in.readLine().split(" ");
			int x1 = Integer.parseInt(y[0]);
			int y1 = Integer.parseInt(y[1]);
			y = in.readLine().split(" ");
			int x2 = Integer.parseInt(y[0]);
			int y2 = Integer.parseInt(y[1]);
			y = in.readLine().split(" ");
			int x3 = Integer.parseInt(y[0]);
			int y3 = Integer.parseInt(y[1]);
			y = in.readLine().split(" ");
			int x4 = Integer.parseInt(y[0]);
			int y4 = Integer.parseInt(y[1]);
			if (x1 != x2 && y1 != y2) {
				System.out.println(Math.abs(x1 - x2) * Math.abs(y1 - y2));
				return;
			}
			if (x1 != x3 && y1 != y3) {
				System.out.println(Math.abs(x1 - x3) * Math.abs(y1 - y3));
				return;
			}

			if (x2 != x3 && y2 != y3) {
				System.out.println(Math.abs(x2 - x3) * Math.abs(y3 - y2));
				return;
			}
			if (x1 != x4 && y1 != y4) {
				System.out.println(Math.abs(x1 - x4) * Math.abs(y1 - y4));
				return;
			}

			if (x2 != x4 && y2 != y4) {
				System.out.println(Math.abs(x2 - x4) * Math.abs(y4 - y2));
				return;
			}
			if (x4 != x3 && y4 != y3) {
				System.out.println(Math.abs(x4 - x3) * Math.abs(y3 - y4));
				return;
			}

			System.out.println(-1);
			return;

		}
		out.close();

	}
}

import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main {

    StringTokenizer st = new StringTokenizer("");
    BufferedReader in;
    PrintWriter out;
    final String inputFile = "input.txt";
    final String outputFile = "output.txt";

    public void solve() throws Exception {
        int n = nextInt();
        int[][] point = new int[n][2];
        for (int i = 0; i < n; i++) {
            point[i][0] = nextInt();
            point[i][1] = nextInt();
        }
        if (n < 2) {
            out.println(-1);
            return;
        }
        if (n == 2) {
            int dx = abs(point[1][0] - point[0][0]);
            int dy = abs(point[1][1] - point[0][1]);
            if (dx == 0 || dy == 0) {
                out.println(-1);
                return;
            }
            out.println(dx * dy);
            return;
        }
        int maxX = Integer.MIN_VALUE, minX = Integer.MAX_VALUE,
            maxY = Integer.MIN_VALUE, minY = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            maxX = max(maxX, point[i][0]);
            minX = min(minX, point[i][0]);
            maxY = max(maxY, point[i][1]);
            minY = min(minY, point[i][1]);
        }
        out.println(abs(maxX - minX) * abs(maxY - minY));
    }

    public void run() throws Exception {
//      in = new BufferedReader(new FileReader(inputFile));
        in = new BufferedReader(new InputStreamReader(System.in));

//      out = new PrintWriter(new FileWriter(outputFile));
        out = new PrintWriter(System.out);

        solve();

        in.close();
        out.close();

    }

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        try {
            new Main().run();
        } catch (Exception e) {
            // TODO: handle exception
            System.err.println(e);
        }
    }

    public String nextToken() throws Exception{
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }

    public Integer nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public Double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }

    public Long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public boolean EOF() throws Exception {
        while (!st.hasMoreTokens()) {
            String s = in.readLine();
            if (s==null) {
                return true;
            }
            st = new StringTokenizer(s);
        }
        return false;
    }

}

import java.util.Scanner;

public class Wilbur {
	public static void main(String ... arg){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		long[] x= new long[n];
		long[] y = new long[n];
		long area = 0;
		int count1 = 1, count2 = 1;
		long x1 = 0, x2 = 0, y1 = 0, y2 = 0;
		for(int i=0;i<n;i++){
			x[i] = s.nextLong();
			y[i] = s.nextLong();

			x1 = x[0];
			y1 = y[0];

			{
				if(i!=0){
					if(x[i]!=x1 && y[i]!=y1){
						count1++;
						count2++;
						x2 = x[i];
						y2 = y[i];
					}
					else if(x[i]==x1 && y[i]!=y1){
						count2++;
						y2 = y[i];
					}
					else if(x[i]!=x1 && y[i]==y1){
						count2++;
						x2 = x[i];
					}

				}

			}
		}
		if(count1>=2 || count2>=3){
			area = Math.abs(x2-x1)*Math.abs(y2-y1);
			System.out.println(area);
		}
		else
			System.out.println("-1");
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A {

	/**
	 * @param args
	 * @throws IOException
	 * @throws NumberFormatException
	 */
	public static void main(String[] args) throws NumberFormatException,
			IOException {
		// TODO Auto-generated method stub
		// Eingabe von Standard.in lesen
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));

		// Eine Zahl(nur eine Zahl in einer Zeile) einlesen
		int n = Integer.parseInt(reader.readLine());

		if(n <= 1){
			System.out.println("-1");
			return;
		}

		int[] x = new int[n];
		int[] y = new int[n];

		for (int i = 0; i < n; i++) {
			// Eine Zeile als String einlesen
			String zeile = reader.readLine();

			// Einen String an einem Zeichen(hier " ") trennen
			String[] zeileGeteilt = zeile.split(" ");

			x[i] = Integer.parseInt(zeileGeteilt[0]);
			y[i] = Integer.parseInt(zeileGeteilt[1]);

		}
		int dx = 0;
		int dy = 0;

		for(int i = 0; i<n;i++){
			for(int j = i+1; j <n; j++){
				dx = Math.max(dx, Math.abs(x[i] - x[j]));
				dy = Math.max(dy, Math.abs(y[i] - y[j]));
			}
		}
		int result = dx*dy;
		if(result == 0){
			System.out.println("-1");
		}
		else{
			System.out.println(result);
		}
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class A {

    static int solve(int [] x, int [] y) {

        if(x.length == 1) {

            return -1;
        }

        boolean isValid = false;

        for(int i=0; i<x.length; i++) {

            for(int j=1 + i; j<x.length; j++) {
                if(x[i] != x[j] && y[i] != y[j]) {
                    isValid = true;
                    break;
                }
            }

            if(isValid)
                break;
        }

        if(!isValid)
            return -1;

        for(int i=0; i<x.length; i++) {
            for(int j=i+1; j<x.length; j++) {
                if(x[i] > x[j]) {

                    int temp = x[i];
                    x[i] = x[j];
                    x[j] = temp;

                    temp = y[i];
                    y[i] = y[j];
                    y[j] = temp;
                }
            }
        }

        int N = x.length;
        int diffX = x[N - 1] - x[0];
        int diffY = 0;

        for(int i=1; i<N; i++) {
            int diff = Math.abs(y[i] - y[i-1]);
            if(diff > 0) {
                diffY = diff;
                break;
            }
        }

        if(diffX == 0 || diffX == 0) {
            return -1;
        }
        return diffX*diffY;
    }

    public static void main(String [] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        StringTokenizer tokenizer;

        int N = Integer.parseInt(br.readLine());

        int [] x = new int[N];
        int [] y = new int[N];

        for(int i=0; i<N; i++)  {
            tokenizer = new StringTokenizer(br.readLine());
            x[i] = Integer.parseInt(tokenizer.nextToken());
            y[i] = Integer.parseInt(tokenizer.nextToken());
        }

        int sol = solve(x,y);

        System.out.println(sol);
    }

}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package codeforces6;

import java.util.Scanner;

/**
 *
 * @author vladik
 */
public class MainA {

    public static class First{
        public int n;
        public int[] x, y;
        public First(){
            Scanner scan = new Scanner(System.in);
            n = scan.nextInt();
            x = new int[n];
            y = new int[n];
            for(int i = 0; i< n; i++){
                x[i] = scan.nextInt();
                y[i] = scan.nextInt();
            }

        }
        public int count(){
            if( n == 1){
                return -1;
            } else if( n == 2){
                if(x[0] != x[1] && y[0] != y[1]){
                    return Math.abs( (x[0] - x[1])*(y[0] - y[1]));
                } else {
                    return -1;
                }
            } else{
                int res = 0;
                for( int i = 0; i < n-1; i++){
                    for( int j = i+1; j < n; j++){
                        res = Math.max(res, Math.abs( (x[i] - x[j])*(y[i] - y[j])) );
                    }
                }
                return res;
            }
        }
    }

    public static void main(String[] args){
        First a = new First();
        System.out.println(a.count());
    }
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package rect;

import java.util.*;

/**
 *
 * @author sahin
 */
public class Rect {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc= new Scanner(System.in);
        int t = sc.nextInt();
        int[][] coord = new int[t][2];

        for(int i=0; i<coord.length; i++)
        {
            coord[i][0] = sc.nextInt();
            coord[i][1] = sc.nextInt();
        }

        if(t<2)
            System.out.println(-1);
        else if(t==2 && (coord[1][0]==coord[0][0] || coord[0][1]==coord[1][1]))
            System.out.println(-1);
        else if(t==2)
        {
            int area = Math.abs((coord[0][1]-coord[1][1]))*Math.abs(coord[0][0]-coord[1][0]);
            System.out.println(area);
        }
        else
        {
            int area=0;
            int length,width;
            length=width=0;
            for(int i=1; i<coord.length; i++)
            {
                if(coord[i][0]!=coord[0][0])
                    length= Math.abs(coord[i][0]-coord[0][0]);
                if(coord[i][1]!=coord[0][1])
                    width = Math.abs(coord[i][1]-coord[0][1]);
            }
            area = length*width;
            System.out.println(area);
        }

    }

}

import java.io.*;
import java.util.Locale;
import java.util.StringTokenizer;

public class Solution implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }
    // solution

    void solve() throws IOException {
        int pointCount = readInt();
        int[][] a = new int[pointCount][2];
        for(int i=0;i<pointCount;i++){
            a[i][0] = readInt();
            a[i][1] = readInt();
        }
        if(pointCount == 1) {
            out.println("-1");
        } else if(pointCount == 2){
            if( a[0][0] == a[1][0] || a[0][1] == a[1][1]){
                out.println("-1");
            } else {
                out.print(calcSquare(a[0],a[1]));
            }
        }
        else if(pointCount == 3){
            for(int i=0;i<3;i++){
                for(int j=i+1; j<3; j++){
                    if(isOnDifCorners(a[i], a[j])){
                        out.print(calcSquare(a[i], a[j]));
                        return;
                    }
                }
            }
        } else {
            for(int i=0;i<4;i++){
                for(int j=i+1; j<4; j++){
                    if(isOnDifCorners(a[i], a[j])){
                        out.print(calcSquare(a[i], a[j]));
                        return;
                    }
                }
            }
        }
    }

    private boolean isOnDifCorners(int[] a1, int[] a2){
        if( a1[0] == a2[0] || a1[1] == a2[1]) {
            return false;
        } else {
            return true;
        }
    }

    private int calcSquare(int[]a1, int[] a2){
        return Math.abs((a1[0] - a2[0]) * (a1[1] - a2[1]));
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Rectange {

	public static void main(String args[]) throws NumberFormatException,
			IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		if (n == 1) {
			br.readLine();
			System.out.println(-1);
		} else {
			int[] xAxis = new int[] { -2000, -2000, -2000, -2000 };
			int[] yAxis = new int[4];
			for (int i = 0; i < n; i++) {
				String[] arr = br.readLine().split(" ");
				xAxis[i] = Integer.parseInt(arr[0]);
				yAxis[i] = Integer.parseInt(arr[1]);

			}
			for(int i=0;i<n;i++){
				for (int j = 0; j <n; j++) {
					if(i==j){
						continue;
					}
					if(xAxis[i]!=xAxis[j] && yAxis[i]!=yAxis[j]){
						int x = xAxis[i]-xAxis[j];
						int y = yAxis[i]-yAxis[j];
						int area = x*y;
						if(area<0){
							area= -area;
						}
						System.out.println(area);
						System.exit(0);
					}
				}
			}
			System.out.println(-1);

		}

	}
}

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
                outputStream, "ASCII"));
        CustomScanner sc = new CustomScanner(inputStream);
        solve(sc, out);
        out.flush();
        out.close();
    }

    static void solve(CustomScanner sc, BufferedWriter out) throws IOException {
        int n = sc.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];
        for (int i=0; i<n; i++)
        {
            x[i]=sc.nextInt();
            y[i]=sc.nextInt();
        }
        if (n==1)
            out.write("-1");
        else if(n==2)
        {
            if (x[0]==x[1] || y[0]==y[1])
                out.write("-1");
            else
            {
                int ans = Math.abs((x[0]-x[1])*(y[0]-y[1]));
                out.write(Integer.toString(ans));
            }
        }
        else
        {
            int ans = 0;
            for (int i=0; i<n-1; i++)
            {
                boolean ansFound = false;
                for (int j=i+1; j<n; j++)
                {
                    if (x[i]!=x[j] && y[i]!=y[j])
                    {
                        ans = Math.abs((x[i]-x[j])*(y[i]-y[j]));
                        ansFound=true;
                        break;
                    }
                    if (ansFound)
                        break;
                }
            }
            out.write(Integer.toString(ans));
        }
    }

    static class CustomScanner {
        BufferedReader br;
        StringTokenizer st;

        public CustomScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }

        private String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.io.*;
import java.util.*;

public class a1 {
	public static void main(String[] args) throws FileNotFoundException {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = in.nextInt();

		int x[] = new int[n];
		int y[] = new int[n];

		for (int i = 0; i < n; i++) {
			x[i] = in.nextInt();
			y[i] = in.nextInt();
		}

		if (n == 1){
			out.println(-1);
		}
		else{
			if (n == 2){
				if (x[0] == x[1] || y[0] == y[1]){
					out.println(-1);
				}
				else{
					out.println(1l * Math.abs(x[0] - x[1]) * Math.abs(y[0] - y[1]));
				}
			}
			else{
				if (x[0] != x[1] && y[0] != y[1]){
					out.println(1l * Math.abs(x[0] - x[1]) * Math.abs(y[0] - y[1]));
				}
				else if (x[0] != x[2] && y[0] != y[2]){
					out.println(1l * Math.abs(x[0] - x[2]) * Math.abs(y[0] - y[2]));
				}
				else{
					out.println(1l * Math.abs(x[2] - x[1]) * Math.abs(y[2] - y[1]));

				}
			}
		}
		out.close();
	}
}

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		for (int i = 0; i < n; i++) {
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
		}
		System.out.println(solve(x, y));

		sc.close();
	}

	static int solve(int[] x, int[] y) {
		int n = x.length;

		if (n == 1 || (n == 2 && (x[0] == x[1] || y[0] == y[1]))) {
			return -1;
		}

		for (int i = 0;; i++) {
			for (int j = i + 1; j < n; j++) {
				if (x[i] != x[j] && y[i] != y[j]) {
					return Math.abs(x[i] - x[j]) * Math.abs(y[i] - y[j]);
				}
			}
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class A {

	public static void main(String[] args) {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt();
		if(n == 1) out.println(-1);
		else {
			TreeSet<Integer> x = new TreeSet<Integer>(), y = new TreeSet<Integer>();
			for(int i = 0; i < n; i++) {
				x.add(scan.nextInt());
				y.add(scan.nextInt());
			}
			if(x.size() == 2 && y.size() == 2) {
				int dx = Math.abs(x.pollFirst()-x.pollFirst()), dy = Math.abs(y.pollFirst()-y.pollFirst());
				out.println(dx*dy);
			} else out.println(-1);
		}
   		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

		public int nextInt() {return Integer.parseInt(next());}

		public long nextLong() {return Long.parseLong(next());}

		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			if(st.hasMoreTokens()) line = st.nextToken();
			else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
			while(st.hasMoreTokens()) line += " "+st.nextToken();
			return line;
		}

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

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

//package Codeforces.Div2A_331.Code1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/*
 * some cheeky quote
 */

public class Main
{
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException
    {
        int n = in.nextInt();
        if (n <= 1)
        {
            System.out.println(-1);
        } else if (n == 2)
        {
            Point a = new Point(in.nextInt(), in.nextInt());
            Point b = new Point(in.nextInt(), in.nextInt());
            if (a.x != b.x && a.y != b.y)
            {
                System.out.println(Math.abs(a.x - b.x) * Math.abs(a.y - b.y));
            } else
            {
                System.out.println(-1);
            }
        } else if (n == 3)
        {
            Point a[] = new Point[3];
            for (int i = 0; i < a.length; i++)
            {
                int x = in.nextInt();
                int y = in.nextInt();
                a[i] = new Point(x, y);
            }
            Arrays.sort(a);

            Point first = a[0];
            Point mid = a[1];
            Point last = a[2];

            if ((mid.x == last.x && mid.y == first.y) || (mid.x == first.x && mid.y == last.y))
            {
                System.out.println(Math.abs(first.x - last.x) * Math.abs(first.y - last.y));
            } else if (last.x == mid.x && last.y == first.y)
            {
                System.out.println(Math.abs(mid.y - last.y) * Math.abs(first.x - last.x));
            } else if (first.x == mid.x && first.y == last.y)
            {
                System.out.println(Math.abs(first.x - last.x) * Math.abs(first.y - mid.y));
            } else
            {
                System.out.println(-1);
            }
        } else
        {
            Point a[] = new Point[4];
            for (int i = 0; i < a.length; i++)
            {
                int x = in.nextInt();
                int y = in.nextInt();
                a[i] = new Point(x, y);
            }

            Arrays.sort(a);

            if (Math.abs(a[0].x - a[1].x) == Math.abs(a[2].x - a[3].x) && Math.abs(a[0].y - a[2].y) == Math.abs(a[1].y - a[3].y))
            {
                System.out.println(Math.abs(a[0].y - a[1].y) * Math.abs(a[0].x - a[2].x));
            } else
            {
                System.out.println(-1);
            }
        }
    }

    public void run()
    {
        try
        {
            in = new FastScanner();
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e)
        {
            e.printStackTrace();
        }
    }

    class FastScanner
    {
        BufferedReader br;
        StringTokenizer st;

        FastScanner()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreTokens())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

    }

    public static void main(String[] arg)
    {
        new Main().run();
    }
}

class Point implements Comparable<Point>
{
    int x;
    int y;

    Point(int x, int y)
    {
        this.x = x;
        this.y = y;
    }

    public int compareTo(Point that)
    {
        if (this.x != that.x)
        {
            return this.x - that.x;
        }
        return this.y - that.y;
    }
}

import java.io.IOException;
import java.io.InputStream;

public class q1 {

    public static void main(String[] args) throws IOException {
        // TODO Auto-generated method stub

        FastScanner in = new FastScanner(System.in);
        //int x,y
        int ar;
        int t=  in.nextInt();
        //String x = in.nextLine();
        if(t==1){
            System.out.println("-1");
        }
        else if(t==2){
            int x1 = in.nextInt();
            int y1 = in.nextInt();

            int x2 = in.nextInt();
            int y2 = in.nextInt();

            if(x1==x2||y1==y2)
                System.out.println("-1");
            else{
                ar = a((x2-x1)*(y2-y1));
                System.out.println(ar);
            }

        }
        else if(t==3){
            int x1 = in.nextInt();
            int y1 = in.nextInt();

            int x2 = in.nextInt();
            int y2 = in.nextInt();

            int x3 = in.nextInt();
            int y3 = in.nextInt();

            //if((x1==x2&&x2==x3)||(y1==y2&&y2==y3))
                //System.out.println("-1");

            //case 2

            if((y2-y1==0)&&(x2-x3==0)){                   //case of 2
                ar = a((x1-x2)*(y2-y3));
                System.out.println(ar);
            }
            else if((y2-y3==0)&&(x2-x1==0)){
                ar = a((x3-x2)*(y2-y1));
                System.out.println(ar);
            }

            else if((y3-y1==0)&&(x3-x2==0)){                   //case of 3
                ar = a((x1-x3)*(y2-y3));
                System.out.println(ar);
            }
            else if((y2-y3==0)&&(x3-x1==0)){
                ar = a((x3-x2)*(y3-y1));
                System.out.println(ar);
            }

            else if((y3-y1==0)&&(x2-x1==0)){                   //case of 1
                ar = a((x1-x3)*(y2-y1));
                System.out.println(ar);
            }
            else if((y2-y1==0)&&(x3-x1==0)){
                ar = a((x1-x2)*(y3-y1));
                System.out.println(ar);
            }

        }

        else if(t==4){
            int x1 = in.nextInt();
            int y1 = in.nextInt();

            int x2 = in.nextInt();
            int y2 = in.nextInt();

            int x3 = in.nextInt();
            int y3 = in.nextInt();

            int x4 = in.nextInt();
            int y4 = in.nextInt();

            ar = (x2-x3)*(y2-y1);
            if(ar!=0){
                System.out.println(a(ar));
            }
            else
            {
                ar = a((y2-y3)*(x1-x2));
                System.out.println(ar);
            }

        }

    }

    private static int a(int i) {
        if(i<0)
            return -i;

        return i;
    }

}

class IO {
    public static void readIntArray(int a[], int N, FastScanner fscan)
            throws IOException {
        readIntArray(a, N, 0, fscan);
    }

    public static void readIntArray(int a[], int N, int start, FastScanner fscan)
            throws IOException {
        for (int i = 0; i < N; i++) {
            a[start + i] = fscan.nextInt();
        }
    }

    public static void readArray(long a[], int N, FastScanner fscan)
            throws IOException {
        readArray(a, N, 0, fscan);
    }

    public static void readArray(long a[], int N, int start, FastScanner fscan)
            throws IOException {
        for (int i = 0; i < N; i++) {
            a[start + i] = fscan.nextInt();
        }
    }
}

class FastScanner {
    InputStream is;
    byte buff[] = new byte[1024];
    int currentChar = -1;
    int buffChars = 0;

    public FastScanner(InputStream inputStream) {
        is = inputStream;
    }

    public boolean hasNext() throws IOException {
        return currentChar == -1 || buffChars > 0;
    }

    public char nextChar() throws IOException {
        // if we already have that next char read, just return else input
        if (currentChar == -1 || currentChar >= buffChars) {
            currentChar = 0;
            buffChars = is.read(buff);
        }

        if (buffChars <= 0) {
            throw new RuntimeException("No char found...");
        }

        int ch;
        while (isSpace(ch = nextCharAsInt()))
            ;
        return (char) ch;
    }

    public int nextCharAsInt() throws IOException {
        // if we already have that next char read, just return else input
        if (currentChar == -1 || currentChar >= buffChars) {
            currentChar = 0;
            buffChars = is.read(buff);
        }

        if (buffChars <= 0) {
            return -1;
        }
        return (char) buff[currentChar++];
    }

    public String nextLine() throws IOException {
        StringBuilder bldr = new StringBuilder();
        int ch;
        while (isLineEnd(ch = nextCharAsInt()))
            // ignore empty lines ???
            ;

        do {
            bldr.append((char) ch);
        } while (!isLineEnd(ch = nextCharAsInt()));

        return bldr.toString();
    }

    public String nextString() throws IOException {
        StringBuilder bldr = new StringBuilder();
        int ch;
        while (isSpace(ch = nextCharAsInt()))
            ;

        do {
            bldr.append((char) ch);
        } while (!isSpace(ch = nextCharAsInt()));

        return bldr.toString();
    }

    public int nextInt() throws IOException {
        // considering ASCII files--> 8 bit chars, unicode files has 16 bit
        // chars (byte1 then byte2)
        int result = 0;
        int sign = 1;
        int ch;
        while (isSpace(ch = nextCharAsInt()))
            ;

        if (ch == '-') {
            sign = -1;
            ch = nextCharAsInt();
        }

        do {
            if (ch < '0' || ch > '9')
                throw new NumberFormatException("Found '" + ch
                        + "' while parsing for int.");

            result *= 10;
            result += ch - '0';
        } while (!isSpace(ch = nextCharAsInt()));

        return sign * result;
    }

    public long nextLong() throws IOException {
        // considering ASCII files--> 8 bit chars, unicode files has 16 bit
        // chars (byte1 then byte2)
        long result = 0;
        int sign = 1;
        int ch;
        while (isSpace(ch = nextCharAsInt()))
            ;

        if (ch == '-') {
            sign = -1;
            ch = nextCharAsInt();
        }

        do {
            if (ch < '0' || ch > '9')
                throw new NumberFormatException("Found '" + ch
                        + "' while parsing for int.");

            result *= 10;
            result += ch - '0';
        } while (!isSpace(ch = nextCharAsInt()));

        return sign * result;
    }

    private boolean isLineEnd(int ch) {
        return ch == '\n' || ch == '\r' || ch == -1;
    }

    private boolean isSpace(int ch) {
        return ch == '\n' || ch == ' ' || ch == '\t' || ch == '\r' || ch == -1;
    }

    public void close() throws IOException {
        is.close();
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.lang.RuntimeException;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException{
        InputReader reader = new InputReader();
        int N = reader.nextInt();
        if ( N == 1 ) {
            int x1 = reader.nextInt();
            int y1 = reader.nextInt();
            System.out.println(-1);
        } else {
            Point[] pointArray = new Point[N];
            for ( int i = 0; i < N; i++ ) {
                pointArray[i] = new Point(reader.nextInt(), reader.nextInt());
            }
            System.out.println(getSquare(pointArray, reader));

        }
    }

    public static int getSquare(Point[] arr, InputReader reader) {
        for ( int i = 0; i < arr.length; i++ ) {
            for ( int j = 0; j < arr.length; j++ ) {
                if ( j == i ) {
                    continue;
                } else {
                    if ( (arr[j].getX() != arr[i].getX()) && (arr[j].getY() != arr[i].getY()) ) {
                        return Math.abs(arr[j].getX() - arr[i].getX()) *
                                 Math.abs(arr[j].getY() - arr[i].getY());
                    }
                }
            }
        }
        return -1;
    }
}

class Point {
    private int x;
    private int y;

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return this.x;
    }

    public int getY() {
        return this.y;
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader() {
        tokenizer = null;
        reader = new BufferedReader(new InputStreamReader(System.in));
    }

    public String nextLine() throws IOException{
        return reader.readLine();
    }

    public String next() {
        while ( tokenizer == null || !tokenizer.hasMoreTokens() ) {
            try {
                tokenizer = new StringTokenizer(nextLine());
            } catch( IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}

//package CFVIRTUAL3;

import java.io.*;
import java.util.*;

public class Q1 {

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader() {
            reader = new BufferedReader(new InputStreamReader(System.in), 32768);
            tokenizer = null;
        }

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(System.in), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public char nextChar() {
            return next().charAt(0);
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int[] nextIntArr(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = this.nextInt();
            }
            return arr;
        }

        public Integer[] nextIntegerArr(int n) {
            Integer[] arr = new Integer[n];
            for (int i = 0; i < n; i++) {
                arr[i] = new Integer(this.nextInt());
            }
            return arr;
        }

        public int[][] next2DIntArr(int n, int m) {
            int[][] arr = new int[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    arr[i][j] = this.nextInt();
                }
            }
            return arr;
        }

        public int[] nextSortedIntArr(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = this.nextInt();
            }
            Arrays.sort(arr);
            return arr;
        }

        public long[] nextLongArr(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = this.nextLong();
            }
            return arr;
        }

        public char[] nextCharArr(int n) {
            char[] arr = new char[n];
            for (int i = 0; i < n; i++) {
                arr[i] = this.nextChar();
            }
            return arr;
        }
    }

    static int gcd(int a, int b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    static int[] uwiSieve(int n) {
        if (n <= 32) {
            int[] primes = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 };
            for (int i = 0; i < primes.length; i++) {
                if (n < primes[i]) {
                    return Arrays.copyOf(primes, i);
                }
            }
            return primes;
        }

        int u = n + 32;
        double lu = Math.log(u);
        int[] ret = new int[(int) (u / lu + u / lu / lu * 1.5)];
        ret[0] = 2;
        int pos = 1;

        int[] isp = new int[(n + 1) / 32 / 2 + 1];
        int sup = (n + 1) / 32 / 2 + 1;

        int[] tprimes = { 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 };
        for (int tp : tprimes) {
            ret[pos++] = tp;
            int[] ptn = new int[tp];
            for (int i = (tp - 3) / 2; i < tp << 5; i += tp)
                ptn[i >> 5] |= 1 << (i & 31);
            for (int i = 0; i < tp; i++) {
                for (int j = i; j < sup; j += tp)
                    isp[j] |= ptn[i];
            }
        }

        // 3,5,7
        // 2x+3=n
        int[] magic = { 0, 1, 23, 2, 29, 24, 19, 3, 30, 27, 25, 11, 20, 8, 4, 13, 31, 22, 28, 18, 26, 10, 7, 12, 21, 17,
                9, 6, 16, 5, 15, 14 };
        int h = n / 2;
        for (int i = 0; i < sup; i++) {
            for (int j = ~isp[i]; j != 0; j &= j - 1) {
                int pp = i << 5 | magic[(j & -j) * 0x076be629 >>> 27];
                int p = 2 * pp + 3;
                if (p > n)
                    break;
                ret[pos++] = p;
                for (int q = pp; q <= h; q += p)
                    isp[q >> 5] |= 1 << (q & 31);
            }
        }

        return Arrays.copyOf(ret, pos);
    }

    public static void main(String[] args) {

        InputReader in = new InputReader();
        int N = in.nextInt();

        int input[][]=new int[N][2];

        for (int i = 0; i < N; i++) {
            input[i][0]=in.nextInt();
            input[i][1]=in.nextInt();
        }

        if(N==1){
            System.out.println(-1);
            return;
        }

        int INF=100000;

        int xmin=INF,ymin=INF,xmax=-INF,ymax=-INF;

        for(int i=0;i<N;i++) {

            xmin=Math.min(xmin,input[i][0]);
            xmax=Math.max(xmax,input[i][0]);

            ymin=Math.min(ymin,input[i][1]);
            ymax=Math.max(ymax,input[i][1]);

        }

        if(xmin==xmax || ymin==ymax) {
            System.out.println(-1);
            return;
        }

        System.out.println((xmax-xmin)*(ymax-ymin));

        //System.out.println(FinalAns);

    }

}

//        HashMap<Integer,Integer> map=new HashMap<>();
//        if(map.containsKey(input[i]))
//            map.put(input[i],map.get(input[i])+1);
//        else
//            map.put(input[i],1);
//
//        for(Map.Entry<Integer,Integer> Test: map.entrySet()){
//            int Key=Test.getKey();
//            int val=Test.getValue();
//        }

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
import java.util.TreeSet;

@SuppressWarnings("unused")
public class B {

	public  static  Scanner scan = new Scanner(System.in);

	public static void solve () {
		int n=scan.nextInt();
		TreeSet<Integer> a1= new TreeSet<Integer>();
		TreeSet<Integer> a2= new TreeSet<Integer>();
		for(int i=0;i<n;i++) {
			int x=scan.nextInt();
			int y=scan.nextInt();
			a1.add(x);a2.add(y);
		}
		//System.out.println(a1);
		if(a1.size()!=2 || a2.size()!=2) System.out.println("-1");
		else {
			System.out.println(Math.abs(a1.first()-a1.last())*Math.abs(a2.first()-a2.last()));
		}
	}
	public static void main(String[] args) {

			solve();
		scan.close();

	}

}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.lang.*;

public class P596A {
    //static long mod=1000000007;

    public static void main(String[] args) throws Exception{
         InputReader in = new InputReader(System.in);
        PrintWriter pw=new PrintWriter(System.out);

            int n=in.readInt();
        Pair p[]=new Pair[n];
        for(int i=0;i<n;i++)
        {
            int x=in.readInt();
            int y=in.readInt();
            Pair c=new Pair(x,y);
            p[i]=c;
        }
        Arrays.sort(p);
        if(n==1)
        {
            pw.println("-1");
        }
        else if(n==2)
        {
            int d1=abs(p[1].a,p[0].a);
            int d2=abs(p[1].b,p[0].b);
            if(d1!=0&&d2!=0)
            {
                int a=d1*d2;
                pw.println(a);
            }
            else
                pw.println("-1");
        }
        else if(n==3)
        {
            int d1=abs(p[1].a,p[0].a);
            int d2=abs(p[1].b,p[0].b);
            int e1=abs(p[2].a,p[0].a);
            int e2=abs(p[2].b,p[0].b);
            int f1=abs(p[2].a,p[1].a);
            int f2=abs(p[2].b,p[1].b);
            HashSet<Integer>hs=new HashSet<Integer>();
            if(d1!=0)
            hs.add(d1);
            if(d2!=0)
            hs.add(d2);
            if(e1!=0)
            hs.add(e1);
            if(e2!=0)
            hs.add(e2);
            if(f1!=0)
            hs.add(f1);
            if(f2!=0)
            hs.add(f2);
            int a=1;
            if(hs.size()==1)
            {
                for(int x:hs)
                {
                    a=x*x;
                }
            }
            else
            {
                for(int x:hs)
                {
                    a*=x;
                }
            }
            pw.println(a);
        }
        else
        {
            int d1=abs(p[3].a,p[0].a);
            int d2=abs(p[3].b,p[0].b);
            int a=d1*d2;
            pw.println(a);
        }

        pw.close();
    }

    public static long  ways(int n, int r, long MOD)
    {
      //  vector<long long> f(n + 1,1);
        long f[]=new long[n+1];
        Arrays.fill(f,1);
        for (int i=2; i<=n;i++)
            f[i]= (f[i-1]*i) % MOD;
        return (f[n]*((InverseEuler(f[r], MOD) * InverseEuler(f[n-r], MOD)) % MOD)) % MOD;
    }
    public static long  InverseEuler(long n, long MOD)
    {
        return pow(n,MOD-2,MOD);
    }
    static boolean isPrime(int number) {
        if (number <= 1) {
            return false;
        }
        if (number <= 3) {
            return true;
        }
        if (number % 2 == 0 || number % 3 == 0) {
            return false;
        }
        int i = 5;
        while (i * i <= number) {
            if (number % i == 0 || number % (i + 2) == 0) {
                return false;
            }
            i += 6;
        }
        return true;
    }

public static long gcd(long x,long y)
{
    if(x%y==0)
        return y;
    else
        return gcd(y,x%y);
}

public static int gcd(int x,int y)
{
    if(x%y==0)
        return y;
    else
        return gcd(y,x%y);
}
public static int abs(int a,int b)
{
    return (int)Math.abs(a-b);
}
public static long abs(long a,long b)
{
    return (long)Math.abs(a-b);
}
public static int max(int a,int b)
{
    if(a>b)
        return a;
    else
        return b;
}
public static int min(int a,int b)
{
    if(a>b)
        return b;
    else
        return a;
}
public static long max(long a,long b)
{
    if(a>b)
        return a;
    else
        return b;
}
public static long min(long a,long b)
{
    if(a>b)
        return b;
    else
        return a;
}

static boolean isPowerOfTwo (long v) {
    return (v & (v - 1)) == 0;
}
public static long pow(long n,long p,long m)
{
     long  result = 1;
      if(p==0)
        return 1;
    if (p==1)
        return n;
    while(p!=0)
    {
        if(p%2==1)
            result *= n;
        if(result>=m)
        result%=m;
        p >>=1;
        n*=n;
        if(n>=m)
        n%=m;
    }
    return result;
}

static class Pair implements Comparable<Pair>
{
    int a,b;
    Pair (int a,int b)
    {
        this.a=a;
        this.b=b;
    }

    public int compareTo(Pair o) {
        // TODO Auto-generated method stub
        if(this.a!=o.a)
        return Integer.compare(this.a,o.a);
        else
            return Integer.compare(this.b, o.b);
        //return 0;
    }
}

static long sort(int a[],int n)
{   int b[]=new int[n];
    return mergeSort(a,b,0,n-1);}
static long mergeSort(int a[],int b[],long left,long right)
{ long c=0;if(left<right)
 {   long mid=left+(right-left)/2;
     c= mergeSort(a,b,left,mid);
     c+=mergeSort(a,b,mid+1,right);
     c+=merge(a,b,left,mid+1,right); }
    return c;    }
static long merge(int a[],int  b[],long left,long mid,long right)
{long c=0;int i=(int)left;int j=(int)mid; int k=(int)left;
while(i<=(int)mid-1&&j<=(int)right)
{ if(a[i]<=a[j]) {b[k++]=a[i++]; }
else    { b[k++]=a[j++];c+=mid-i;}}
while (i <= (int)mid - 1)   b[k++] = a[i++];
while (j <= (int)right) b[k++] = a[j++];
for (i=(int)left; i <= (int)right; i++)
    a[i] = b[i];  return c;  }

   static  class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

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

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

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

        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public double readDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, readInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return readString();
        }

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

     static class OutputWriter
    {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream)
        {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer)
        {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects)
        {
            for (int i = 0; i < objects.length; i++)
            {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects)
        {
            print(objects);
            writer.println();
        }

        public void close()
        {
            writer.close();
        }

        public void flush()
        {
            writer.flush();
        }

    }
    /* USAGE

    //initialize
        InputReader in      = new InputReader(System.in);
        OutputWriter out    =   new OutputWriter(System.out);

    //read int
    int i = in.readInt();
    //read string
    String s = in.readString();
    //read int array of size N
    int[] x = IOUtils.readIntArray(in,N);
    //printline
    out.printLine("X");

    //flush output
    out.flush();

    //remember to close the
    //outputstream, at the end
    out.close();

    */
  static   class IOUtils {

        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.readInt();
            return array;
    }
    }
//BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    //StringBuilder sb=new StringBuilder("");
     //InputReader in = new InputReader(System.in);
  // OutputWriter out = new OutputWriter(System.out);
    //PrintWriter pw=new PrintWriter(System.out);
    //String line=br.readLine().trim();

    //int t=Integer.parseInt(br.readLine());
  //    while(t-->0)
    //{
    //int n=Integer.parseInt(br.readLine());
    //long n=Long.parseLong(br.readLine());
    //String l[]=br.readLine().split(" ");
  //int m=Integer.parseInt(l[0]);
    //int k=Integer.parseInt(l[1]);
    //String l[]=br.readLine().split(" ");
    //l=br.readLine().split(" ");
    /*int a[]=new int[n];
    for(int i=0;i<n;i++)
    {
        a[i]=Integer.parseInt(l[i]);
    }*/
       //System.out.println(" ");

    //}
}

//package CF;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class B {
    static class Point implements Comparable<Point>{
	int x, y;

	Point(int a, int b) { x = a; y = b; }

	public int compareTo(Point p)
	{
	    if(Math.abs(x - p.x) > 0) return x > p.x ? 1 : -1;
	    if(Math.abs(y - p.y) > 0) return y > p.y ? 1 : -1;
	    return 0;
	}
    }

    public static void main(String[] args) throws IOException
    {
	Scanner bf = new Scanner(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = bf.nextInt();
	if(n == 1)
	    out.println(-1);
	else{
	    Point [] p = new Point[n];
	    for (int i = 0; i < n; i++)
	    {
		p[i] = new Point(bf.nextInt(), bf.nextInt());
	    }
	    Arrays.sort(p);
	    if(n == 2 && (p[0].x == p[1].x || p[0].y == p[1].y))
		out.println(-1);
	    else{
		if(p[n-1].y == p[0].y)
		    p[n-1].y = p[1].y;
		out.println(Math.abs(p[n-1].x-p[0].x)*Math.abs(p[n-1].y-p[0].y));
	    }
	}
	out.flush();
	out.close();
    }
    static class Scanner{
	BufferedReader bf;
	StringTokenizer st;
	public Scanner(FileReader f){
	    bf = new BufferedReader(f);
	}
	public Scanner(InputStream f){
	    bf = new BufferedReader(new InputStreamReader(f));
	}

	public String next() throws IOException{
	    while(st == null || !st.hasMoreTokens())
		st = new StringTokenizer(bf.readLine());
	    return st.nextToken();
	}
	public int nextInt() throws NumberFormatException, IOException{
	    return Integer.parseInt(next());
	}
    }
}

import java.util.Scanner;

/**
 *
 * @author sarthak
 */
public class rnd331_A {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        if (n == 1) {
            System.out.println(-1);
        }
        if (n == 2) {
            int x1 = s.nextInt();
            int y1 = s.nextInt();
            int x2 = s.nextInt();
            int y2 = s.nextInt();

            if (x1 == x2 || y1 == y2) {
                System.out.println(-1);
                return;
            } else {
                System.out.println((int)Math.abs(x2 - x1) * Math.abs(y2 - y1));
                return;

            }

        }
        if (n == 3) {
            int x1 = s.nextInt();
            int y1 = s.nextInt();
            int x2 = s.nextInt();
            int y2 = s.nextInt();
            int x3 = s.nextInt();
            int y3 = s.nextInt();
            if ((x1 == x2 && x1 == x3) || (y1 == y2 && y1 == y3)) {
                System.out.println(-1);
                return;
            } else if ((double) ((double) (y2 - y1) / (double) (x2 - x1)) == (double) ((double) (y3 - y2) / (double) (x3 - x2))) {
                System.out.println(-1);
                return;
            } else if ((x1 == x2 && y1 == y3) || (x1 == x3 && y1 == y2)) {
              int ar = (int)(Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) * Math.sqrt((y3 - y1) * (y3 - y1) + (x3 - x1) * (x3 - x1)));
                ar = (int) ar;
                System.out.println(ar);
                return;
            } else if ((x2 == x1 && y2 == y3) || (x2 == x3 && y2 == y1)) {
                int ar = (int)(Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) * Math.sqrt((y3 - y2) * (y3 - y2) + (x3 - x2) * (x3 - x2)));
                ar = (int) ar;
                System.out.println(ar);
                return;

            } else if ((x3 == x1 && y3 == y2) || (x3 == x2 && y3 == y1)) {
                int ar = (int)(Math.sqrt((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1)) * Math.sqrt((y3 - y2) * (y3 - y2) + (x3 - x2) * (x3 - x2)));
                ar = (int) ar;
                System.out.println(ar);
                return;
            }
        }
        if (n == 4) {

            int x1 = s.nextInt();
            int y1 = s.nextInt();
            int x2 = s.nextInt();
            int y2 = s.nextInt();
            int x3 = s.nextInt();
            int y3 = s.nextInt();
            int x4 = s.nextInt();
            int y4 = s.nextInt();
            int ar;
            if (y1 == y2 || y4 == y3) {

                if (x1 == x3) {
                    ar = (int)(Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) * Math.sqrt((y3 - y1) * (y3 - y1) + (x3 - x1) * (x3 - x1)));
                } else {
                    ar = (int)(Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) * Math.sqrt((y4 - y1) * (y4 - y1) + (x4 - x1) * (x4 - x1)));
                }
                ar = (int) ar;
                System.out.println(ar);
                return;
            } else if (y1 == y3 || y2 == y4) {
                if (x3 == x2) {
                    ar = (int)(Math.sqrt((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1)) * Math.sqrt((y3 - y2) * (y3 - y2) + (x3 - x2) * (x3 - x2)));
                } else {
                    ar = (int)(Math.sqrt((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1)) * Math.sqrt((y3 - y4) * (y3 - y4) + (x3 - x4) * (x3 - x4)));
                }
                ar = (int) ar;
                System.out.println(ar);
                return;
            } else if (y1 == y4 || y2 == y3) {
                if (x1 == x2) {
                    ar = (int)(Math.sqrt((x4 - x1) * (x4 - x1) + (y4 - y1) * (y4 - y1)) * Math.sqrt((y1 - y2) * (y1 - y2) + (x1 - x2) * (x1 - x2)));
                } else {
                    ar = (int)(Math.sqrt((x4 - x1) * (x4 - x1) + (y4 - y1) * (y4 - y1)) * Math.sqrt((y3 - y1) * (y3 - y1) + (x3 - x1) * (x3 - x1)));
                }

                ar = (int) ar;
                System.out.println(ar);
                return;

            }
        }
    }
}

import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),ans;
		int[][] data = new int[n][2];

		for(int i=0;i<n;i++)
		{
			data[i][0] = sc.nextInt();
			data[i][1] = sc.nextInt();
		}

		if(n==1)
			System.out.println("-1");
		else if(n==2)
		{
			if(data[0][0]==data[1][0] || data[0][1]==data[1][1])
				System.out.println("-1");
			else
				System.out.println(Math.abs(data[0][0]-data[1][0])*Math.abs(data[0][1]-data[1][1]));
		}
		else if(n==3)
		{
			double dist1,dist2,dist3;
			dist1 = Math.pow((data[0][0]-data[1][0]),2)+Math.pow((data[0][1]-data[1][1]),2);
			dist2 = Math.pow((data[0][0]-data[2][0]),2)+Math.pow((data[0][1]-data[2][1]),2);
			dist3 = Math.pow((data[1][0]-data[2][0]),2)+Math.pow((data[1][1]-data[2][1]),2);

			if(dist1==dist2+dist3)
			{
				System.out.println((int)Math.sqrt(dist2*dist3));
			}
			else if(dist2==dist3+dist1)
			{
				System.out.println((int)Math.sqrt(dist1*dist3));
			}
			else if(dist3==dist1+dist2)
			{
				System.out.println((int)Math.sqrt(dist1*dist2));
			}
			else
				System.out.println("-1");

			//int m1 = (data[0][1]-data[1][1])/(data[][])
//			if(data[0][0]==data[1][0] && data[1][1]==data[2][1])
//			{
//				System.out.println(Math.abs(data[0][0]-data[2][0])*Math.abs(data[0][1]-data[2][1]));
//				if(data[0][1]==data[2][1])
//					System.out.println(Math.abs(data[0][1]-data[1][1])*Math.abs(data[0][0]-data[2][0]));
//				else if(data[1][1]==data[2][1])
//					System.out.println(Math.abs(data[0][1]-data[1][1])*Math.abs(data[1][0]-data[2][0]));
//				else
//				System.out.println("-1");
//			}
//			else if(data[1][0]==data[2][0] && data[2][1]==data[0][1])
//			{
//				System.out.println(Math.abs(data[0][0]-data[1][0])*Math.abs(data[0][1]-data[1][1]));
//			}
//			else if(data[2][0]==data[0][0] || data[0][1]==data[1][1])
//			{
//				System.out.println(Math.abs(data[1][0]-data[2][0])*Math.abs(data[1][1]-data[2][1]));
//			}
//			else
//				System.out.println("-1");
		}
		else
		{
			double dist1,dist2,dist3;
			dist1 = Math.pow((data[0][0]-data[1][0]),2)+Math.pow((data[0][1]-data[1][1]),2);
			dist2 = Math.pow((data[0][0]-data[2][0]),2)+Math.pow((data[0][1]-data[2][1]),2);
			dist3 = Math.pow((data[0][0]-data[3][0]),2)+Math.pow((data[0][1]-data[3][1]),2);

			if(dist1==dist2+dist3)
			{
				System.out.println((int)Math.sqrt(dist2*dist3));
			}
			else if(dist2==dist3+dist1)
			{
				System.out.println((int)Math.sqrt(dist1*dist3));
			}
			else if(dist3==dist1+dist2)
			{
				System.out.println((int)Math.sqrt(dist1*dist2));
			}
			else
				System.out.println("-1");
		}
		sc.close();
	}

}

import java.util.Scanner;

public class Pool {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		if(n <= 1)
			System.out.print(-1);
		else {
			int width = 0;
			int height = 0;
			int[] xs = new int[n];
			int[] ys = new int[n];
			for(int i = 0; i < n; i++){
				xs[i] = s.nextInt();
				ys[i] = s.nextInt();
				if(i > 0) {
						height = Math.max(height, Math.abs(ys[i] - ys[i-1]));
						width = Math.max(width, Math.abs(xs[i] - xs[i-1]));
				}
			}
			if( width == 0 || height == 0)
				System.out.print(-1);
			else
				System.out.print(width*height);
		}
	}

}

import java.util.*;
import java.io.*;
public class Wilbur_and_Swimming_Pool
{
	public static void main(String args[]) throws Exception
	{
		BufferedReader f=new BufferedReader(new InputStreamReader(System.in));
		int runs=Integer.parseInt(f.readLine());
		if(runs==1)
			System.out.println(-1);
		else if(runs==2)
		{
			StringTokenizer st=new StringTokenizer(f.readLine());
			int one_x=Integer.parseInt(st.nextToken());
			int one_y=Integer.parseInt(st.nextToken());
			st=new StringTokenizer(f.readLine());
			int two_x=Integer.parseInt(st.nextToken());
			int two_y=Integer.parseInt(st.nextToken());
			if(one_x!=two_x&&one_y!=two_y)
				System.out.println(Math.abs(one_x-two_x)*Math.abs(one_y-two_y));
			else
				System.out.println(-1);
		}
		else if(runs>=3)
		{
			int min_x=Integer.MAX_VALUE;
			int max_x=Integer.MIN_VALUE;
			int min_y=Integer.MAX_VALUE;
			int max_y=Integer.MIN_VALUE;
			for(int x=0;x<runs;x++)
			{
				StringTokenizer st=new StringTokenizer(f.readLine());
				int tempx=Integer.parseInt(st.nextToken());
				int tempy=Integer.parseInt(st.nextToken());
				min_x=Math.min(min_x,tempx);
				min_y=Math.min(min_y,tempy);
				max_x=Math.max(max_x,tempx);
				max_y=Math.max(max_y,tempy);
			}
			System.out.println((max_x-min_x)*(max_y-min_y));
		}
	}
}

import java.math.*;
import java.io.*;
import java.util.*;
public class C596A{
   public static long[] cAr, div;
   public static int N,M,K;
   public static int[] numCycle;
   public static Map<Integer,Set<Integer>> map;
   public static long MOD = 1000000007;
   public static void main(String[] args) throws IOException{
      InputReader in=new InputReader(new InputStreamReader(System.in));
      PrintWriter out=new PrintWriter(new BufferedOutputStream(System.out));
      int N=in.nextInt();
      ArrayList<Integer> xC=new ArrayList<Integer>();
      ArrayList<Integer> yC=new ArrayList<Integer>();
      Set<Integer> xS=new HashSet<Integer>();
      Set<Integer> yS=new HashSet<Integer>();
      for(int x=0;x<N;x++){
      int[] ar=in.nextIntAr();
      xS.add(ar[0]);
      yS.add(ar[1]);
      }
      for(int x:xS) xC.add(x);
      for(int y:yS) yC.add(y);
      if(xC.size()==2 && yC.size()==2){
         int dx=xC.get(1)-xC.get(0);
         int dy=yC.get(1)-yC.get(0);
         System.out.println(Math.abs(dx*dy));
      }
      else System.out.println("-1");
   }

   public static void setUpChoose(int t){
      cAr=new long[t+1];
      div=new long[t+1];
      cAr[0]=1;
      div[0]=1;

      for(int x=1;x<=t;x++){
         cAr[x]=(x*cAr[x-1])%(MOD);
         div[x]=pow(cAr[x],MOD-2);}
   }

   public static long choose(int x,int y){
      long a=cAr[x+y];
      long b=div[x];
      long c=div[y];
      a=(a*b)%MOD;
      a=(a*c)%MOD;
      return a;
   }

   public static long pow(long a,long b){
      if(b==1)
         return a;
      long c=b/2;
      long temp=pow(a,c)%MOD;
      temp=(temp*temp)%MOD;
      if(b%2==1) temp=temp*a;
      return temp%MOD;
   }
}

class InputReader{
   private BufferedReader br;
   public InputReader(InputStreamReader in){
      br=new BufferedReader(in);
   }
   public int nextInt(){
      try{
         return Integer.parseInt(br.readLine());}
      catch(IOException e){throw new InputMismatchException();}
   }
   public int[] nextIntAr(){
      try{
         String[] s=br.readLine().split(" ");
         int[] ret=new int[s.length];
         for(int x=0;x<s.length;x++)
            ret[x]=Integer.parseInt(s[x]);
         return ret;}

      catch(IOException e){throw new InputMismatchException();}
   }

   public long nextLong(){
      try{
         return Long.parseLong(br.readLine());}
      catch(IOException e){throw new InputMismatchException();}
   }
   public long[] nextLongAr(){
      try{
         String[] s=br.readLine().split(" ");
         long[] ret=new long[s.length];
         for(int x=0;x<s.length;x++)
            ret[x]=Long.parseLong(s[x]);
         return ret;}

      catch(IOException e){throw new InputMismatchException();}
   }

   public String[] nextStringAr(){
      try{
         return br.readLine().split(" ");}

      catch(IOException e){throw new InputMismatchException();}
   }

   public String nextString(){
      try{
         return br.readLine();}

      catch(IOException e){throw new InputMismatchException();}
   }
}

class Pair implements Comparable<Pair>{
   long a;
   long b;

   public Pair(long ma, long mb){
      a = ma;
      b = mb;
   }

   public int compareTo(Pair o){
      if(a == o.a){
         if(b==o.b)
            return 0;
         return b<o.b?-1:1;
      }
      return a<o.a?-1:1;
   }
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package rectangle;

/**
 *
 * @author a574110
 */
import java.util.Scanner;

public class Rectangle {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);

        int ans = -1;

        int count = Integer.valueOf(sc.nextLine());
        Point points[] = new Point[count];
        for(int i = 0; i< count; i++){
            points[i] = new Point(sc.nextLine());
        }

        int a1 = 0, a2 = 0, b1 = 0, b2 = 0;

        if(count >= 2){
            for (int i =0; i < count; i++){
                a1 = points[i].x;
                b1 = points[i].y;
                for(int j = 0; j < count; j++){
                    if(a1 != points[j].x && b1 != points[j].y){
                        a2 = points[j].x;
                        b2 = points[j].y;

                        ans = (Math.max(a1, a2)-Math.min(a1,a2))*(Math.max(b1, b2) - Math.min(b1, b2));
                        System.out.println(ans);
                        return;
                    }

                }

            }
        }
        System.out.println(ans);
    }

}
class Point{
        int x;
        int y;
        Point(String s){
            String[] arr = s.split(" ");
            this.x = Integer.valueOf(arr[0]);
            this.y = Integer.valueOf(arr[1]);
        }
    }

import java.util.Scanner;

public class A {

	static class Point {
		long x;
		long y;

		Point(long x, long y) {
			this.x = x;
			this.y = y;
		}
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		Point[] points = new Point[n];

		for(int i = 0; i < n; i++) {
			points[i] = new Point(in.nextInt(), in.nextInt());
		}

		System.out.println(solve(points));

		in.close();
	}

	private static long solve(Point[] points) {
		if(points.length <= 1) return -1;
		if(points.length == 2) {
			if((points[0].x == points[1].x) || (points[0].y == points[1].y)) return -1;
			return area(points[0], points[1]);
		}
		Point[] diff = getDifferentPoints(points);
		return area(diff[0], diff[1]);
	}

	private static long area(Point p1, Point p2) {
		return Math.abs(p1.x - p2.x) * Math.abs(p1.y - p2.y);
	}

	private static Point[] getDifferentPoints(Point[] points) {
		Point[] diffPoints = new Point[2];

		for(int i = 0; i < points.length; i++) {
			for(int j = 0; j < points.length; j++) {
				if((i != j) && ((points[i].x != points[j].x) && (points[i].y != points[j].y))) {
					diffPoints[0] = points[i];
					diffPoints[1] = points[j];
					return diffPoints;
				}
			}
		}
		return null;
	}
}

//package CodeForces.Round331;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * Created by ilya on 15.11.15.
 */
public class A596 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        switch (n){
            case 1:
                System.out.println(-1);
                break;
            case 2:
                int aX = sc.nextInt();
                int aY = sc.nextInt();
                int bX = sc.nextInt();
                int bY = sc.nextInt();
                if(aX == bX || aY == bY){
                    System.out.println(-1);
                    break;
                }
                System.out.println(getS(aX,aY,bX,bY));
                break;
            case 3:
            case 4:
                List<int[]> points = new ArrayList<>();
                for (int i = 0; i < n; i++) {
                    int a1 = sc.nextInt();
                    int b1 = sc.nextInt();
                    points.add(new int[]{a1,b1});
                }
                for (int i = 0; i < points.size(); i++) {
                    int[] a = points.get(i);
                    for (int j = 0; j < points.size(); j++) {
                        if(j == i) continue;
                        int[] b = points.get(j);
                        if(a[0] == b[0]||a[1] ==b[1]) continue;
                        int c = getS(a[0],a[1],b[0],b[1]);
                        if(c!=0){
                            System.out.println(c);
                            return;
                        }
                    }

                }
                break;
        }

    }

    public static int getS(int aX, int aY, int bX, int bY){
            return Math.abs(Math.abs(Math.max(aX, bX)) - (aX<0&&bX<0?Math.abs(Math.min(aX, bX)):Math.min(aX, bX)))*Math.abs(Math.abs(Math.max(aY, bY)) - (aY<0 && bY<0?Math.abs(Math.min(aY, bY)):Math.min(aY, bY)));
    }
}

import java.awt.Point;
import java.util.ArrayList;
import java.util.Scanner;

public class a {
	public static void main(String[] args) {
		try (Scanner scan = new Scanner(System.in)) {
			int N = scan.nextInt();
			if (N==1){System.out.println(-1);return;}
			ArrayList<Point> list = new ArrayList<Point>();
			for (int i = 0; i < N; i++) list.add(new Point(scan.nextInt(), scan.nextInt()));

			if (N==2){
				if (list.get(0).x !=list.get(1).x && list.get(0).y != list.get(1).y){
					System.out.println(Math.abs((list.get(0).x-list.get(1).x) *
							(list.get(0).y-list.get(1).y))); return;
				} else {
					System.out.println(-1);
					return;
				}
			}

			Point a=list.get(0), b = null;
			for (int i = 1; i < list.size(); i++)
				if (list.get(i).x != a.x && list.get(i).y!=a.y){
					b=list.get(i);
					break;
				}
			if (b==null)a=list.get(1);
			for (int i=2;i<list.size();i++)
				if (list.get(i).x!=a.x && list.get(i).y!=a.y){
					b=list.get(i);
					break;
				}
			System.out.println(Math.abs((a.x-b.x)*(a.y-b.y)));
		}
	}
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

public class Main {

	private static StreamTokenizer inputReader = new StreamTokenizer(
			new BufferedReader(new InputStreamReader(System.in)));

	public static int nextInt() {
		int a = -1;
		try {
			inputReader.nextToken();
			a = (int) inputReader.nval;
		} catch (Exception e) {
		}
		return a;
	}

	public static void main(String[] args) {
		int n = nextInt();

		int[] xs = new int[n];
		int[] ys = new int[n];

		int minX = Integer.MAX_VALUE;
		int maxX = Integer.MIN_VALUE;
		int minY = Integer.MAX_VALUE;
		int maxY = Integer.MIN_VALUE;

		for (int i = 0; i < n; i++) {
			int x = nextInt();
			int y = nextInt();

			if (x < minX) {
				minX = x;
			}

			if (x > maxX) {
				maxX = x;
			}

			if (y < minY) {
				minY = y;
			}

			if (y > maxY) {
				maxY = y;
			}
		}

		int diffX = maxX - minX;
		int diffY = maxY - minY;

		int area = diffX * diffY;

		if (area == 0) {
			System.out.println(-1);
		} else {
			System.out.println(Math.abs(area));
		}

	}

	private static class Pair implements Comparable<Pair>{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public int compareTo(Pair other) {
			if (this.x != other.x) {
				return Integer.compare(this.x, other.x);
			}

			return Integer.compare(this.y, other.y);
		}
	}

}

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Test {

    public static void main(String[] args) {
         Kattio io = new Kattio(System.in,System.out);
         boolean flag=false;
         int n=io.getInt();
         if(n==1){io.println("-1"); io.close(); return;}
         int[]x= new int[n];
         int[]y= new int[n];
         int i,j=0;
         long answer=-1;
         for(i=0;i<n;i++){
             x[i]=io.getInt();
             y[i]=io.getInt();
         }
         if(n==2){
             if(y[0]==y[1] || x[0]==x[1]){
                 {io.println("-1"); io.close(); return;}
             }
             else{
                 answer=Math.abs(x[0]-x[1])*Math.abs(y[0]-y[1]);
             }
         }

         if(n==4){
        for(i=0;i<n;i++){
            for(j=0;j<n;j++){ //io.println("i:"+i);
                if(x[i]!=x[j] && y[j]!=y[i]){flag=true; break;}
            }
            if(flag)break;
        }
       // if(i==4)i=3; if(j==4)j=3;
        if(i==j)
         {io.println("-1"); io.close(); return;}

        else{
             answer=Math.abs(x[i]-x[j])*Math.abs(y[i]-y[j]);
        }

         }

         if(n==3){
                for(i=0;i<n;i++){
                    for(j=0;j<n;j++){ //io.println("i:"+i);
                        if(x[i]!=x[j] && y[j]!=y[i]){flag=true; break;}
                    }
                    if(flag)break;
                }
               //if(i==3)i=2; if(j==3)j=2;
                if(i==j)
                 {io.println("-1"); io.close(); return;}

                else{
                     answer=Math.abs(x[i]-x[j])*Math.abs(y[i]-y[j]);
                }

                 }
         io.println(answer);
         io.close();
    }
static class Kattio extends PrintWriter {
    public Kattio(InputStream i) {
    super(new BufferedOutputStream(System.out));
    r = new BufferedReader(new InputStreamReader(i));
    }
    public Kattio(InputStream i, OutputStream o) {
    super(new BufferedOutputStream(o));
    r = new BufferedReader(new InputStreamReader(i));
    }

    public boolean hasMoreTokens() {
    return peekToken() != null;
    }

    public int getInt() {
    return Integer.parseInt(nextToken());
    }

    public double getDouble() {
    return Double.parseDouble(nextToken());
    }

    public long getLong() {
    return Long.parseLong(nextToken());
    }

    public String getWord() {
    return nextToken();
    }

    private BufferedReader r;
    private String line;
    private StringTokenizer st;
    private String token;

    private String peekToken() {
    if (token == null)
        try {
        while (st == null || !st.hasMoreTokens()) {
            line = r.readLine();
            if (line == null) return null;
            st = new StringTokenizer(line);
        }
        token = st.nextToken();
        } catch (IOException e) { }
    return token;
    }

    private String nextToken() {
    String ans = peekToken();
    token = null;
    return ans;
    }
}
}

import java.util.*;
public class ProA {
	static int n,a,b,ans,x1,x2,y1,y2;

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		n=in.nextInt();
		x1=y1=10000;x2=y2=-10000;
		for(int i=0;i<n;i++)
		{
			a=in.nextInt();b=in.nextInt();
			x1=Math.min(x1,a);
			x2=Math.max(x2,a);
			y1=Math.min(y1,b);
			y2=Math.max(y2,b);
		}
		if(x1==x2||y1==y2) ans=-1;
		else ans=(x2-x1)*(y2-y1);
		System.out.println(ans);
	}
}

import java.util.Scanner;

public class Masked{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int t= scan.nextInt();
		int x[] = new int[t];
		int y[] = new int[t];

		for(int i = 0 ; i < t ; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int p = 0,p1=0;
		int same = 0 ;
		int pointX = x[0];
		int pointY = y[0];
		for(int i = 1 ; i < t ; i++){
			if(pointX == x[i]){
				same++;
				p = i;
			}
		}

		for(int i = 1 ; i < t ;i++){
			if(pointY == y[i]) {
				same++;
				p1 = i;
			}
		}

		if(same == 0){
			if(t <= 1){
				System.out.println(-1);
				return;
			}
			if(t == 2){
				System.out.println(Math.abs(x[1]-x[0])*Math.abs(x[1]-x[0]));
			}
		}else{
			p = 0;
			p1 = 0;
			int jk= 0;
			same = 0;
			for(int j = 0 ; j< t ; j++){
				pointX = x[j];
				pointY = y[j];
				//System.out.println("pointX: "+pointX);
				//System.out.println("pointY: "+pointY);
				for(int i = 0 ; i<t; i++){
					if(pointX == x[i] && i != j){
						same++;
						p = i;
						//System.out.println("p:"+p);
					}
				}

				for(int i = 0 ; i < t;i++){
					if(pointY == y[i] && i!=j) {
						same++;
						p1 = i;
						//System.out.println("p1:"+p1);
					}
				}
				if(same == 2){
					jk = j;
					break;
				}
			}

			if(same == 2){
				//System.out.println("p: "+p+" p1: "+p1);
				//System.out.println("x[jk]: "+x[jk]+" x[p1]: "+x[p1]);
				//System.out.println("y[jk]: "+y[jk]+" y[p]: "+y[p]);
				System.out.println(Math.abs(x[jk]-x[p1])*Math.abs(y[jk]-y[p]));
			}else{
				System.out.println(-1);
			}

		}

	}

}

import java.util.Scanner;

public class AAAAAAAAAAAAAA {
public static void main(String[] args) {
	Scanner sc=new Scanner(System.in);
	int n=sc.nextInt();
	if(n==1){
		System.out.println("-1");
		return;
	}
	if(n==2){
		double x1=sc.nextDouble();
		double y1=sc.nextDouble();
		double x2=sc.nextDouble();
		double y2=sc.nextDouble();
		long a=(long) Math.abs((x1-x2)*(y1-y2));
		if(a==0){
			System.out.println("-1");
		}else{
			System.out.println(a);
		}
		return;
	}
	if(n==3){
		double x1=sc.nextDouble();
		double y1=sc.nextDouble();
		double x2=sc.nextDouble();
		double y2=sc.nextDouble();
		double x3=sc.nextDouble();
		double y3=sc.nextDouble();
		double a=(double) Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		double b=(double) Math.sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
		double c=(double) Math.sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
		if(a==(long)a){
			if(b==(long)b){
			System.out.println((long)a*b);	return;
			}
			if(c==(long)c){
				System.out.println((long)a*b);	return;
			}
		}
		if(b==(long)b){
			if(c==(long)c){
				System.out.println((long)c*b);	return;
			}
			System.out.println("-1");
		}
		return;
	}
	if(n==3){
		double x1=sc.nextDouble();
		double y1=sc.nextDouble();
		double x2=sc.nextDouble();
		double y2=sc.nextDouble();
		double x3=sc.nextDouble();
		double y3=sc.nextDouble();
		double x4=sc.nextDouble();
		double y4=sc.nextDouble();
		double a=(double) Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		double b=(double) Math.sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
		double c=(double) Math.sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
		double d=(double) Math.sqrt((x4-x3)*(x4-x3)+(y4-y3)*(y4-y3));
		if(a==b&&c==d){
			System.out.println((long)a*c);return;
		}
		if(a==c&&b==d){
			System.out.println((long)a*b);return;
		}
		if(a==d&&b==c){
			System.out.println((long)a*b);return;
		}
		System.out.println("-1");
		return;
	}

}
}

//package mashiro;
import java.io.*;
import java.util.Set;
import java.util.TreeSet;
import java.util.Iterator;
public class Main {
	final static int N = 500000+10;
	static StreamTokenizer cin = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
	static PrintWriter cout = new PrintWriter(new OutputStreamWriter(System.out));
	static int n;
	static int[] x = new int[4];
	static int[] y = new int[4];
	public static void main(String[] args) throws IOException{
		cin.nextToken(); n = (int)cin.nval;
		for(int i = 0;i < n;i++){
			cin.nextToken(); x[i] = (int)cin.nval;
			cin.nextToken(); y[i] = (int)cin.nval;
		}
		if(n == 1 || (n == 2 && (x[0] == x[1] || y[0] == y[1])))
			cout.println(-1);
		else
			cout.println(1);
		cout.flush();
	}
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by Leonti on 2015-11-13.
 */
public class A {
    public static void main(String[] args){
        InputReader inputReader = new InputReader(System.in);
        PrintWriter printWriter = new PrintWriter(System.out, true);

        int n = inputReader.nextInt();

        int x1 = -1000;
        int y1 = -1000;
        int x2 = 1000;
        int y2 = 1000;

        if (n == 1) {
            printWriter.print(-1);
        } else {
            for (int i = 0; i < n; i++) {
                int x = inputReader.nextInt();
                int y = inputReader.nextInt();

                if (x > x1 && y > y1) {
                    x1 = x;
                    y1 = y;
                }
                if (x < x2 && y < y2) {
                    x2 = x;
                    y2 = y;
                }
            }

            if (x1 == x2 || y1 == y2) {
                printWriter.print(-1);
            } else {
                printWriter.print((x1 - x2) * (y1 - y2));
            }
        }

        printWriter.close();
    }

    static class InputReader {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public char[][] nextCharTable(int rows, int columns) {
            char[][] table = new char[rows][];
            for (int i = 0; i < rows; ++i) {
                table[i] = next().toCharArray();
                assert table[i].length == columns;
            }
            return table;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(readLine());
            }
            return tokenizer.nextToken();
        }

        public String readLine() {
            String line;
            try {
                line = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }
    }
}

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while( in.hasNext() ) {
			int n = in.nextInt();
			int[] x = new int[n];
			int[] y = new int[n];
			for( int i = 0 ; i < n ; i++ ) {
				x[i] = in.nextInt();
				y[i] = in.nextInt();
			}
			if( n < 2 ) System.out.println(-1);
			else if( n == 2 ){
				if( x[0] == x[1] || y[0] == y[1] ) System.out.println(-1);
				else System.out.println( Math.abs((x[0]-x[1])*(y[0]-y[1])) );
			} else if( n == 3 ) {
				for( int i = 0 ; i < 3 ; i++ ) {
					int j = (i+1>2)?(i-1):i+1;
					int k = (i+2>2)?i:i+2;
					if( (x[i] == x[j] && y[i] == y[k]) ) {
						System.out.println(Math.abs((x[j]-x[k])*(y[j]-y[k])));
						break;
					}
				}
			} else {
				for( int i = 1 ; i < 4 ; i++ ) {
					if( (x[0] != x[i]) && ( y[0] != y[i] ) ) {
						System.out.println(Math.abs((x[0]-x[i])*(y[0]-y[i])));
						break;
					}
				}
			}
		}
	}
}

import java.io.*;
import java.util.*;

public class Main {
	public static void main (String [] args) throws IOException {
		OutputWriter outputWriter = new OutputWriter();

		// InputReader in = new InputReader("A.in"); PrintWriter out = outputWriter.getOutputWriter("A.out");
		InputReader in = new InputReader(System.in); PrintWriter out = outputWriter.getOutputWriter(System.out);
		int n = in.nextInt();
		int maxx = -10000000;
		int minx = 10000000;
		int maxy = -10000000;
		int miny = 10000000;
		int [] xx = new int[4];
		int [] yy = new int[4];
		for(int i = 0; i < n; ++i){
			int x = in.nextInt();
			int y = in.nextInt();
			xx[i] = x;
			yy[i] = y;
			maxy = Math.max(maxy, y);
			miny = Math.min(miny, y);
			maxx = Math.max(maxx, x);
			minx = Math.min(minx, x);
		}
		int x = maxx - minx;
		int y = maxy - miny;
		int ans = -1;
		if(x * y > 0) ans = 1;
		else ans = -1;

		if(ans == 1 && n > 2){
			if(n == 3) {
				if(xx[0] != xx[1] && xx[1] != xx[2] && xx[0] != xx[2]) ans = -1;
				if(yy[0] != yy[1] && yy[1] != yy[2] && yy[0] != yy[2]) ans = -1;
			}
			else {
				// bubble sort
				for(int i = 0; i< 4; ++i){
					for(int j = 0; j < 3; ++j){
						if(xx[j] > xx[j+1]) {
							int t = xx[j];
							xx[j] = xx[j+1];
							xx[j+1] = t;
						}
						if(yy[j] > yy[j+1]){
							int t = yy[j];
							yy[j] = yy[j+1];
							yy[j+1] = t;
						}
					}
				}
				if(xx[0] != xx[1] || xx[2] != xx[3]) ans = -1;
				if(yy[0] != yy[1] || yy[2] != yy[3])ans = -1;
			}
		}
		out.println(ans);
		out.close();
		System.exit(0);
	}

	static class InputReader
	{
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream inputStream)
		{
			reader = new BufferedReader(new InputStreamReader(inputStream));
			tokenizer = null;
		}

		public InputReader(String inputFile) throws FileNotFoundException
		{
			reader = new BufferedReader(new FileReader(inputFile));
			tokenizer = null;
		}

		public String nextLine()
		{
			String curr = "";
			try {
				curr = reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
			return curr;
		}

		public String nextString()
		{
			while(tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(nextLine());
				} catch (Exception e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt()
		{
			return Integer.parseInt(nextString());
		}

		public long nextLong()
		{
			return Long.parseLong(nextString());
		}

		public double nextDouble(){
			return Double.parseDouble(nextString());
		}
	}

	static class OutputWriter
	{
		public PrintWriter getOutputWriter(String outputFile) throws IOException
		{
			return new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
		}
		public PrintWriter getOutputWriter(OutputStream outputStream) throws IOException
		{
			return new PrintWriter(new OutputStreamWriter(outputStream));
		}
	}
}

import java.util.*;
import java.io.*;
import java.math.BigInteger.*;
/*
 * Priority queue is an ADT.
 * Operation - Insert data based on the key.
 * Operation - Delete the min or max element.
 * Operation - Get the min or max element.s
 * 10
 * 10 4 8 9 123 56 3 9 56 1
 */
public class Q5 {

	static InputReader in=new InputReader(System.in);
	static PrintWriter out=new PrintWriter(System.out);
	public static void main(String args[])
	{
		int n,i;
		n=in.readInt();
		int a[][]=new int[n+1][2];
		for(i=1;i<=n;i++)
		{
			a[i][0]=in.readInt();
			a[i][1]=in.readInt();
		}
		if(n==1)
			out.println("-1");
		else if(n==2)
		{
			if(a[1][0]!=a[2][0]&&a[1][1]!=a[2][1])
			{
				out.println(Math.abs(a[1][0]-a[2][0])*Math.abs(a[1][1]-Math.abs(a[2][1])));
			}
			else
			{
				out.println("-1");
			}
		}
		else if(n==3)
		{
			if(a[1][0]==a[2][0]&&a[1][1]==a[3][1])
			{
				int l1=(int)Math.sqrt(Math.pow(a[1][0]-a[2][0],2)+Math.pow(a[1][1]-a[2][1],2));
				int l2=(int)Math.sqrt(Math.pow(a[1][0]-a[3][0],2)+Math.pow(a[1][1]-a[3][1],2));
				out.println(l1*l2);
			}
			else if(a[2][0]==a[1][0]&&a[2][1]==a[3][1])
			{
				int l1=(int)Math.sqrt(Math.pow(a[2][0]-a[1][0],2)+Math.pow(a[2][1]-a[1][1],2));
				int l2=(int)Math.sqrt(Math.pow(a[2][0]-a[3][0],2)+Math.pow(a[2][1]-a[3][1],2));
				out.println(l1*l2);
			}
			else if(a[3][0]==a[2][0]&&a[3][1]==a[1][1])
			{
				int l1=(int)Math.sqrt(Math.pow(a[3][0]-a[2][0],2)+Math.pow(a[3][1]-a[2][1],2));
				int l2=(int)Math.sqrt(Math.pow(a[3][0]-a[1][0],2)+Math.pow(a[3][1]-a[1][1],2));
				out.println(l1*l2);
			}
		}
		else if(n==4)
		{
			int l1=(int)Math.sqrt(Math.pow(a[1][0]-a[2][0],2)+Math.pow(a[1][1]-a[2][1],2));
			int l2=(int)Math.sqrt(Math.pow(a[1][0]-a[3][0],2)+Math.pow(a[1][1]-a[3][1],2));
			int l3=(int)Math.sqrt(Math.pow(a[1][0]-a[4][0],2)+Math.pow(a[1][1]-a[4][1],2));
			int max=Math.max(Math.max(l1,l2),l3);
			if(l1==max)
				out.println(l2*l3);
			else if(l2==max)
				out.println(l1*l3);
			else
				out.println(l1*l2);
		}
		// else if(n==3)
		// {

		// }
		// else
		// {
			// int l1,l2,l3;
			// l1=Math.sqrt(a[1][0]-a[2][0]);
			// l2=a[1][0]-a[]
		// }
		out.flush();
		out.close();
	}
	public static <T> Set<Set<T>> powerSet(Set<T> originalSet) {
		Set<Set<T>> sets = new HashSet<Set<T>>();
		if (originalSet.isEmpty()) {
			sets.add(new HashSet<T>());
			return sets;
		}
		List<T> list = new ArrayList<T>(originalSet);
		T head = list.get(0);
		Set<T> rest = new HashSet<T>(list.subList(1, list.size()));
		for (Set<T> set : powerSet(rest)) {
			Set<T> newSet = new HashSet<T>();
			newSet.add(head);
			newSet.addAll(set);
			sets.add(newSet);
			sets.add(set);
		}
		return sets;
	}
}
/*class Max_PQ{
	   int size=0;
	   int pq[];
	   int capacity = 0;
	   int min_val = -1;
	   public Max_PQ(int capacity,int min_val){
		   this.capacity = capacity;
		   pq=new int[capacity+1];
		   this.min_val = min_val;
		   Arrays.fill(pq,min_val);
	   }
	   public void heapify(int parent){
		 if(parent<=size/2){
			 int max = parent;
			 if((2*parent+1)<size&&pq[2*parent+1]!=min_val&&pq[parent]<pq[2*parent+1])
				 max=2*parent+1;
			 if((2*parent+2)<size&&pq[2*parent+2]!=min_val&&pq[max]<pq[2*parent+2])
				 max=2*parent+2;
//				 System.out.println(max+" "+pq[2*parent+1]+" "+pq[2*parent+2]);
			 if(max!=parent){
				 int temp=pq[max];
				 pq[max]=pq[parent];
				 pq[parent]=temp;
				 heapify(max);
			 }
		 }
	   }
	   public void insert(int data){
		   int i=size;
		   size++;
		   while(i>0&&data>pq[(i-1)/2]){
			   pq[i]=pq[(i-1)/2];
			   i=(i-1)/2;
		   }
		   pq[i]=data;
	   }
	   public void delete(){
		   if(size == 0){
			   System.out.println("No element");
		   }
		   else{
			   pq[0]=pq[size-1];
			   size--;
			   heapify(0);
		   }
	   }
	   public void delete(int data,int parent){
		  if(parent<size){
			  if(pq[parent]==data){
				  pq[parent]=pq[size-1];
				  size--;
				  heapify(parent);
			  }
			  else{
				  delete(data,2*parent+1);
				  delete(data,2*parent+2);
			  }
		  }
	   }
	   public int getMax(){
		   if(size==0){
			   return -1;
		   }
		   else{
			   return pq[0];
		   }
	   }
	   public int getAndDelMax(){
		   if(size == 0){
			   return -1;
		   }
		   else{
			   int ans = getMax();
			   delete(ans,0);
			   return ans;
		   }
	   }
	   public void display(){
		   //System.out.println(count);
		   for(int i=0;i<size;i++){
			   System.out.print(pq[i]+" ");
		   }
		   System.out.println();
	   }
	}
class Min_PQ{
	   int size=0;
	   int pq[];
	   int capacity = 0;
	   int min_val = -1;
	   public Min_PQ(int capacity,int min_val){
		   this.capacity = capacity;
		   pq=new int[capacity+1];
		   this.min_val = min_val;
		   Arrays.fill(pq,min_val);
	   }
	   public void heapify(int parent){
		 if(parent<=size/2){
			 int max = parent;
			 if((2*parent+1)<size&&pq[2*parent+1]!=min_val&&pq[parent]>pq[2*parent+1])
				 max=2*parent+1;
			 if((2*parent+2)<size&&pq[2*parent+2]!=min_val&&pq[max]>pq[2*parent+2])
				 max=2*parent+2;
//				 System.out.println(max+" "+pq[2*parent+1]+" "+pq[2*parent+2]);
			 if(max!=parent){
				 int temp=pq[max];
				 pq[max]=pq[parent];
				 pq[parent]=temp;
				 heapify(max);
			 }
		 }
	   }
	   public void insert(int data){
		   int i=size;
		   size++;
		   while(i>0&&data<pq[(i-1)/2]){
			   pq[i]=pq[(i-1)/2];
			   i=(i-1)/2;
		   }
		   pq[i]=data;
	   }
	   public void delete(){
		   if(size == 0){
			   System.out.println("No element");
		   }
		   else{
			   pq[0]=pq[size-1];
			   size--;
			   heapify(0);
		   }
	   }
	   public void delete(int data,int parent){
		  if(parent<size){
			  if(pq[parent]==data){
				  pq[parent]=pq[size-1];
				  size--;
				  heapify(parent);
			  }
			  else{
				  delete(data,2*parent+1);
				  delete(data,2*parent+2);
			  }
		  }
	   }
	   public int getMin(){
		   if(size==0){
			   return -1;
		   }
		   else{
			   return pq[0];
		   }
	   }
	   public int getAndDelMin(){
		   if(size == 0){
			   return -1;
		   }
		   else{
			   int ans = getMin();
			   delete(ans,0);
			   return ans;
		   }
	   }
	   public void display(){
		   //System.out.println(count);
		   for(int i=0;i<size;i++){
			   System.out.print(pq[i]+" ");
		   }
		   System.out.println();
	   }
	}
class CustomOperations{
	public static ArrayList<Long> sieve(long n)
  {
  	int i,j;
  	ArrayList<Long> list=new ArrayList<Long>();
  	int n_n=(int)Math.sqrt(n);
  	boolean tp[]=new boolean[100000001];
  	tp[0]=tp[1]=true;
  	for(i=2;i<=n_n;i++)
  	{
  		if(!tp[i])
  		for(j=2*i;j<=n;j+=i)
  		{
  			tp[j]=true;
  		}
  	}
  	for(j=2;j<=n;j++)
  	  if(!tp[j])
  		list.add((long)j);
  	return list;
  }
	public static ArrayList<Integer> sieve(int n)
  {
  	int i,j;
  	ArrayList<Integer> list=new ArrayList<Integer>();
  	int n_n=(int)Math.sqrt(n);
  	boolean tp[]=new boolean[n+1];
  	tp[0]=tp[1]=true;
  	for(i=2;i<=n_n;i++)
  	{
  		if(!tp[i])
  		for(j=2*i;j<=n;j+=i)
  		{
  			tp[j]=true;
  		}
  	}
  	for(j=2;j<=n;j++)
  	  if(!tp[j])
  		list.add(j);
  	return list;
  }
	public static boolean[] sieve1(int n)
  {
  	int i,j;
  	int n_n=(int)Math.sqrt(n);
  	boolean tp[]=new boolean[n+1];
  	tp[0]=tp[1]=true;
  	for(i=2;i<=n_n;i++)
  	{
  		if(!tp[i])
  		for(j=2*i;j<=n;j+=i)
  		{
  			tp[j]=true;
  		}
  	}
  	return tp;
  }
  public static ArrayList<Long> segmented_sieve(long m,long n)
  {
  	long tp,lb,ub,j;
  	long n_n=(long)Math.sqrt(n);
  	ArrayList<Long> ans=sieve(n_n);
  	if(n_n<m)
  		lb=m;
  	else
  		lb=n_n+1;
  	ub=lb+n_n;
  	ArrayList<Long> ans1=new ArrayList<Long>();
  	while(ub<=n)
  	{
  		boolean mark[]=new boolean[(int)(ub-lb+2)];
  		for(long i:ans)
  		{
  			tp=(long)Math.ceil((double)lb/i)*i;
  			for(j=tp;j<=ub;j+=i)
  				mark[(int)(j-lb)]=true;
  		}
  		for(j=lb;j<=ub;j++)
  			if(!mark[(int)(j-lb)])
  				ans.add(j);
  		lb=ub+1;
  		ub=lb+n_n;
  		if(lb>n)
  			break;
  		if(ub>=n)
  			ub=n;
  	}
  	for(long i:ans)
  		if(i>=m&&i<=n)
  			ans1.add(i);
  	return ans1;
  }
	public static long[] divisors(long m,long n)
	{
		ArrayList<Integer> ans=sieve((int)Math.sqrt(n));
  	boolean check[]=sieve1(10000);
		long mark[]=new long[(int)(n-m+1)];
		for(long i=m;i<=n;i++)
			mark[(int)(i-m)]=i;
		long div[]=new long[(int)(n-m+1)];
		Arrays.fill(div,1);
		for(long i:ans)
		{
			for(long j=(long)Math.ceil((double)m/i)*i;j<=n;j+=i)
			{
				long tp=mark[(int)(j-m)];
				int ct=0;
				while(tp%i==0)
				{
					ct++;
					tp/=i;
				}
				div[(int)(j-m)]*=ct+1;
				mark[(int)(j-m)]=tp;
			}
		}
		return div;
	}
	public static int lowerBound(int a[],int x,int n)
	{
		    int l = 0;
		    int h = n;
		    while (l < h) {
		        int mid = (l + h) / 2;
		        if (x <= a[mid]) {
		            h = mid;
		        } else {
		            l = mid + 1;
		        }
		    }
		    return l;
	}
	public static int upperBound(int a[],int x,int n)
	{
		int l = 0;
	    int h = n;
	    while (l < h) {
	        int mid = (l + h) / 2;
	        if (x >= a[mid]) {
	            l = mid + 1;
	        } else {
	            h = mid;
	        }
	    }
	    return l;
	}
}*/
class InputReader{
	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

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

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

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

	public double readDouble() {
      int c = read();
      while (isSpaceChar(c))
          c = read();
      int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
      }
		double res = 0;
		while (!isSpaceChar(c) && c != '.') {
			if (c == 'e' || c == 'E')
				return res * Math.pow(10, readInt());
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
      }
		if (c == '.') {
			c = read();
			double m = 1;
			while (!isSpaceChar(c)) {
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, readInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				m /= 10;
				res += (c - '0') * m;
				c = read();
          }
      }
		return res * sgn;
  }

	public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} 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 String next() {
		return readString();
	}

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

import java.io.*;
import java.util.*;

public class Main {
	public static void main (String [] args) throws IOException {
		OutputWriter outputWriter = new OutputWriter();

		// InputReader in = new InputReader("A.in"); PrintWriter out = outputWriter.getOutputWriter("A.out");
		InputReader in = new InputReader(System.in); PrintWriter out = outputWriter.getOutputWriter(System.out);
		int n = in.nextInt();
		int maxx = -10000000;
		int minx = 10000000;
		int maxy = -10000000;
		int miny = 10000000;
		int [] xx = new int[4];
		int [] yy = new int[4];
		for(int i = 0; i < n; ++i){
			int x = in.nextInt();
			int y = in.nextInt();
			xx[i] = x;
			yy[i] = y;
			maxy = Math.max(maxy, y);
			miny = Math.min(miny, y);
			maxx = Math.max(maxx, x);
			minx = Math.min(minx, x);
		}
		int x = maxx - minx;
		int y = maxy - miny;
		int ans = -1;
		if(x * y > 0) ans = 1;
		else ans = -1;

		if(ans == 1 && n > 2){
			if(n == 3) {
				if(xx[0] != xx[1] && xx[1] != xx[2] && xx[0] != xx[2]) ans = -1;
				if(yy[0] != yy[1] && yy[1] != yy[2] && yy[0] != yy[2]) ans = -1;
			}
			else {
				// bubble sort
				for(int i = 0; i< 4; ++i){
					for(int j = 0; j < 3; ++j){
						if(xx[j] > xx[j+1] || (xx[j] == xx[j+1] && yy[j] > yy[j+1])) {
							int t = xx[j];
							xx[j] = xx[j+1];
							xx[j+1] = t;
							t = yy[j];
							yy[j] = yy[j+1];
							yy[j+1] = t;
						}
					}
				}

				if(xx[0] != xx[1] || xx[2] != xx[3]) ans = -1;
				if(yy[0] != yy[2] || yy[1] != yy[3]) ans = -1;
			}
		}
		out.println(ans);
		out.close();
		System.exit(0);
	}

	static class InputReader
	{
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream inputStream)
		{
			reader = new BufferedReader(new InputStreamReader(inputStream));
			tokenizer = null;
		}

		public InputReader(String inputFile) throws FileNotFoundException
		{
			reader = new BufferedReader(new FileReader(inputFile));
			tokenizer = null;
		}

		public String nextLine()
		{
			String curr = "";
			try {
				curr = reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
			return curr;
		}

		public String nextString()
		{
			while(tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(nextLine());
				} catch (Exception e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt()
		{
			return Integer.parseInt(nextString());
		}

		public long nextLong()
		{
			return Long.parseLong(nextString());
		}

		public double nextDouble(){
			return Double.parseDouble(nextString());
		}
	}

	static class OutputWriter
	{
		public PrintWriter getOutputWriter(String outputFile) throws IOException
		{
			return new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
		}
		public PrintWriter getOutputWriter(OutputStream outputStream) throws IOException
		{
			return new PrintWriter(new OutputStreamWriter(outputStream));
		}
	}
}

import java.io.PrintWriter;
import java.util.Scanner;

public class Application {

	public static void main(String[] args) {

		int n;
		Scanner input = null;
		PrintWriter output = null;
		output = new PrintWriter(System.out);
		input = new Scanner(System.in);
		boolean diagonal = false;
		n = input.nextInt();
		double area = 0;
		if (n > 1) {
			int[][] points = new int[4][2];
			for (int i = 0; i < n; i++) {
				points[i][0] = input.nextInt();
				points[i][1] = input.nextInt();
			}
			for (int i = 0; i < n; i++) {
				for (int j = 0; i < n; j++) {
					if (points[i][0] != points[j][0] && points[i][1] != points[j][1]) {
						diagonal = true;
						area = Math.abs(points[i][0] - points[j][0]) * Math.abs(points[i][1] - points[j][1]);
						output.println(Math.round(area));
						break;
					}
				}
				if (diagonal) {
					break;
				}
			}
		}
		else {
			output.println(-1);
		}
		input.close();
		output.close();
	}

}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by peacefrog on 11/15/15.
 * Time : 10:33 PM
 */

public class Task_A {
	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	PrintWriter out;
	long timeBegin, timeEnd;

	public void runIO() throws IOException {
		timeBegin = System.currentTimeMillis();

		InputStream inputStream;
		OutputStream outputStream;

		if (ONLINE_JUDGE) {
			inputStream = System.in;
			Reader.init(inputStream);
			outputStream = System.out;

			out = new PrintWriter(outputStream);

		} else {
			inputStream = new FileInputStream("/home/peacefrog/Dropbox/IdeaProjects/Problem Solving/input");
			Reader.init(inputStream);
			out = new PrintWriter("output.txt");
		}

		solve();

		out.flush();
		out.close();
		timeEnd = System.currentTimeMillis();

		System.err.println("Time = " + (timeEnd - timeBegin));

	}

	/*
	 * Start Solution Here
	 */

	private void solve() throws IOException {
		int n = Reader.nextInt(); //This Variable default in Code Templete
		int[]x = new int[4];
		int y [] = new int[4];

		if(n==1) {
			x[0] = Reader.nextInt();
			y[0] = Reader.nextInt();
			System.out.println(-1);
			return;
		}
		if(n==2)
		{
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				y[i] = Reader.nextInt();
			}
			if(x[0]==x[1] || y[0]==y[1])
			{
				System.out.println(-1);
				return;
			}
			x[2] = x[1];
			y[2] = y[0];

			int len1 = x[2] -x[0] ;
			int len2 = y[2] -y[1];
			int area = len1 * len2 ;
			if(area !=0)
				System.out.println(Math.abs(area));
			else System.out.println(-1);
			return;
		}
		if (n==3 )
		{
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				y[i] = Reader.nextInt();
			}
			int len1 = x[2] -x[0] ;
			int len2 = y[2] -y[1];
			int area = len1 * len2 ;
			if(area !=0)
				System.out.println(Math.abs(area));
			else System.out.println(-1);
			return;
		}
		if(n ==4 )
		{
			int sumy = 0, sumx = 0;
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				sumx+= x[i];
				y[i] = Reader.nextInt();
				sumy += y[i];
			}

			sumx+= x[0];
			sumy += y[0];
			int dif = sumx - sumy ;
			System.out.println(dif/2);
		}

	}

	public static void main(String[] args) throws IOException {

		new Task_A().runIO();
	}

	static class Reader {
		static BufferedReader reader;
		static StringTokenizer tokenizer;

		/**
		 * call this method to initialize reader for InputStream
		 */
		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer("");
		}

		/**
		 * get next word
		 */
		static String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		static String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return "";
		}

		static int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		static long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		static double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
	}

}

import java.util.Scanner;

public class Masked{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int t= scan.nextInt();
		int x[] = new int[t];
		int y[] = new int[t];

		for(int i = 0 ; i < t ; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int p = 0,p1=0;
		int same = 0 ;
		int pointX = x[0];
		int pointY = y[0];
		for(int i = 1 ; i < t ; i++){
			if(pointX == x[i]){
				same++;
				p = i;
			}
		}

		for(int i = 1 ; i < t ;i++){
			if(pointY == y[i]) {
				same++;
				p1 = i;
			}
		}

		if(same == 0){
			if(t <= 1){
				System.out.println(-1);
				return;
			}
			if(t == 2){
				System.out.println(Math.abs(x[1]-x[0])*Math.abs(y[1]-y[0]));
			}

		}else{
			p = 0;
			p1 = 0;
			int jk= 0;
			same = 0;
			for(int j = 0 ; j< t ; j++){
				pointX = x[j];
				pointY = y[j];
				//System.out.println("pointX: "+pointX);
				//System.out.println("pointY: "+pointY);
				for(int i = 0 ; i<t; i++){
					if(pointX == x[i] && i != j){
						same++;
						p = i;
						//System.out.println("p:"+p);
					}
				}

				for(int i = 0 ; i < t;i++){
					if(pointY == y[i] && i!=j) {
						same++;
						p1 = i;
						//System.out.println("p1:"+p1);
					}
				}
				if(same == 2){
					jk = j;
					break;
				}
			}

			if(same >= 2){
				//System.out.println("p: "+p+" p1: "+p1);
				//System.out.println("x[jk]: "+x[jk]+" x[p1]: "+x[p1]);
				//System.out.println("y[jk]: "+y[jk]+" y[p]: "+y[p]);
				System.out.println(Math.abs(x[jk]-x[p1])*Math.abs(y[jk]-y[p]));
			}else{
				System.out.println(-1);
			}

		}

	}

}

import java.util.*;

public class Main {
    public static void main(String []args)
{
    Scanner s=new Scanner (System.in);
int n=s.nextInt();
switch (n)
{
case 1: {
    System.out.println(-1);
break;}

case 2: {
    int x1=s.nextInt(),y1=s.nextInt();
    int x2=s.nextInt(),y2=s.nextInt();
    if (y1==y2 || x1==x2)
    {
        System.out.println(-1);
    } else {
    int ans=(Math.abs(y2-y1)*Math.abs(x2-x1));
    System.out.println(ans);
    }
break;}

case 3: {
    int x1=s.nextInt(),y1=s.nextInt();
    int x2=s.nextInt(),y2=s.nextInt();
    int x3=s.nextInt(),y3=s.nextInt();
    if (x1==x2 || y1==y2)
    {
        // 1 + 3
        int ans=(Math.abs(y3-y1)*Math.abs(x3-x1));
        System.out.println(ans);
    } else if (x1==x3 || y1==y3)
    {
     // 1 + 2
        int ans=(Math.abs(y2-y1)*Math.abs(x2-x1));
        System.out.println(ans);
    } else if (x2!=x3 && y2!=y3){
    // 2 + 3
        int ans=(Math.abs(y2-y3)*Math.abs(x2-x3));
        System.out.println(ans);
    } else
        System.out.println(-1);
break;}

case 4: {
    int x1=s.nextInt(),y1=s.nextInt();
    int x2=s.nextInt(),y2=s.nextInt();
    int x3=s.nextInt(),y3=s.nextInt();
    int x4=s.nextInt(),y4=s.nextInt();
    int w=0;
    if (y1==y2)
        w=Math.abs(y2-y1);
    if (y1==y3)
        w=Math.abs(y3-y1);
    if (y1==y4)
        w=Math.abs(y4-y1);
    int h=0;
    if (x1==x2)
        h=Math.abs(x2-x1);
    if (x1==x3)
        h=Math.abs(x3-x1);
    if (x1==x4)
        h=Math.abs(x4-x1);
    System.out.println(h*w);
break;}
default:break;  }
    }

}

import java.io.*;
import java.util.*;
public class pool {
	public static void pool_problem() throws Exception {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter writer = new PrintWriter(new OutputStreamWriter(System.out));
		StringTokenizer st = new StringTokenizer(reader.readLine());
		int n = Integer.parseInt(st.nextToken());
		int area = 0;
		int[] x = new int[4];
		int[] y = new int[4];
		if (n == 1) {
			area = -1;
		} else {
			for (int i = 0; i < n; i ++) {
				StringTokenizer st1 = new StringTokenizer(reader.readLine());
				x[i / 2] = Integer.parseInt(st1.nextToken());
				y[i / 2] = Integer.parseInt(st1.nextToken());
			}
			if ((n == 2) && ((x[0] == x[1]) || (y[0] == y[1]))) area = -1;
			else {
				int l = Math.abs(x[0] - x[1]);
				int w = Math.abs(y[0] - y[1]);
				if (l == 0) l = Math.abs(x[0] - x[2]);
				if (w == 0) w = Math.abs(y[0] - y[2]);
				area = l * w;
			}
		}

		writer.println(area);
		writer.close();
		reader.close();
	}

	public static void main(String[] args) throws Exception {
		pool_problem();
	}
}

import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main {

    StringTokenizer st = new StringTokenizer("");
    BufferedReader in;
    PrintWriter out;
    final String inputFile = "input.txt";
    final String outputFile = "output.txt";

    public void solve() throws Exception {
        int n = nextInt();
        int[][] point = new int[n][2];
        for (int i = 0; i < n; i++) {
            point[i][0] = nextInt();
            point[i][1] = nextInt();
        }
        if (n < 2) {
            out.println(-1);
            return;
        }
        if (n == 2) {
            int dx = point[1][0] - point[0][0];
            int dy = point[1][1] - point[0][1];
            if (dx == 0 || dy == 0) {
                out.println(-1);
                return;
            }
            out.println(dx * dy);
            return;
        }
        int maxX = 0, minX=Integer.MAX_VALUE, maxY = 0, minY = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            maxX = max(maxX, point[i][0]);
            minX = min(minX, point[i][0]);
            maxY = max(maxY, point[i][1]);
            minY = min(minY, point[i][1]);
        }
        out.println((maxX - minX) * (maxY - minY));
    }

    public void run() throws Exception {
//      in = new BufferedReader(new FileReader(inputFile));
        in = new BufferedReader(new InputStreamReader(System.in));

//      out = new PrintWriter(new FileWriter(outputFile));
        out = new PrintWriter(System.out);

        solve();

        in.close();
        out.close();

    }

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        try {
            new Main().run();
        } catch (Exception e) {
            // TODO: handle exception
            System.err.println(e);
        }
    }

    public String nextToken() throws Exception{
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }

    public Integer nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public Double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }

    public Long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public boolean EOF() throws Exception {
        while (!st.hasMoreTokens()) {
            String s = in.readLine();
            if (s==null) {
                return true;
            }
            st = new StringTokenizer(s);
        }
        return false;
    }

}

import java.io.*;
import java.lang.reflect.Array;
import java.math.*;
import java.security.KeyStore.Entry;
import java.util.*;

public class Main {
	private InputStream is;
	private PrintWriter out;
	int time = 0, dp[][], DP[][], dist[], prime[], start[], parent[], end[],
			val[], black[], arr[], arr1[][];
	long MOD = (long) (1e9 + 9);
	ArrayList<Pair>[] amp;
	boolean b[], b1[];
	Pair prr1[];
	char ch[][], c[];
	HashSet<Integer> hs1 = new HashSet<>(), hs2 = new HashSet<>();

	public static void main(String[] args) throws Exception {
		new Thread(null, new Runnable() {
			public void run() {
				try {

					// new Main().soln();
				} catch (Exception e) {
					System.out.println(e);
				}
			}
		}, "1", 1 << 26).start();
		new Main().soln();
	}

	int MAX = 1000010, N, K, p = 1;
	PriorityQueue<Pair> pq;
	int Dp[][] = new int[1010][1010];
	int MOD1 = 1000000007, MOD2 = 1000000009;
	void solve() {
		int n = ni();
		if(n==1){
			System.out.println(-1);
		}
		if(n==2){
			int x1 = ni(), y1 = ni(), x2 = ni(), y2 = ni();
			if(x1==x2 || y1==y2){
				System.out.println(-1);
			}
			else{
				System.out.println(Math.abs((x2-x1)*(y2-y1)));
			}
		}
		if(n==3){
			int x1 = ni(), y1 = ni(), x2 = ni(), y2 = ni(), x3 = ni(), y3 = ni();
			int w = 0, h = 0;
			if(x1==x2){
				h = Math.abs(y2-y1);
			}
			else if(x1==x3){
				h = Math.abs(y3-y1);
			}
			else h = Math.abs(y2-y1);
			if(y1==y2){
				w = Math.abs(x2-x1);
			}
			else if(y1==y3){
				w = Math.abs(x3-x1);
			}
			else w = Math.abs(x2-x1);
			System.out.println(h*w);
		}
		if(n==4){
			int x1 = ni(), y1 = ni(), x2 = ni(), y2 = ni(), x3 = ni(), y3 = ni();
			int w = 0, h = 0;
			if(x1==x2){
				h = Math.abs(y2-y1);
			}
			else if(x1==x3){
				h = Math.abs(y3-y1);
			}
			else h = Math.abs(y2-y1);
			if(y1==y2){
				w = Math.abs(x2-x1);
			}
			else if(y1==y3){
				w = Math.abs(x3-x1);
			}
			else w = Math.abs(x2-x1);
			System.out.println(h*w);
		}
	}
	class cell implements Comparable<cell>{
		char ch;
		int i;
		cell(char c, int x){
			ch = c;
			i = x;
		}
		public boolean equals(Object o) {
			cell other = (cell) o;
			return ((ch == other.ch && i == other.i));// || (v == other.u && u ==
			// other.v));
		}
		@Override
		public int compareTo(cell c) {
			if(this.ch<c.ch) return -1;
			if(this.ch==c.ch) {
				if(this.i<c.i)return 1;
				if(this.i==c.i) return 0;
				return -1;
			}
			return 1;
		}

		public String toString() {
			return "[u=" + ch + ", v=" + i + "]";
		}

	}
	int T[] = new int[100010], L[] = new int[100010];
	int P[][] = new int[100010][30];

	void process3(int N) {
		int i, j;

		// we initialize every element in P with -1
		for (i = 0; i < N; i++)
			for (j = 0; 1 << j < N; j++)
				P[start[i]][j] = -1;

		// the first ancestor of every node i is T[i]
		for (i = 0; i < N; i++)
			P[start[i]][0] = T[i];

		// bottom up dynamic programing
		for (j = 1; 1 << j < N; j++)
			for (i = 0; i < N; i++)
				if (P[start[i]][j - 1] != -1)
					P[start[i]][j] = P[P[start[i]][j - 1]][j - 1];
	}

	int query(int p, int q) {
		int tmp = 0, log = 0, i = 0;

		// if p is situated on a higher level than q then we swap them
		if (L[p] < L[q])
			tmp = p;
		p = q;
		q = tmp;

		// we compute the value of [log(L[p)]
		for (log = 1; 1 << log <= L[p]; log++)
			;
		log--;

		// we find the ancestor of node p situated on the same level
		// with q using the values in P
		for (i = log; i >= 0; i--)
			if (L[p] - (1 << i) >= L[q])
				p = P[p][i];

		if (p == q)
			return p;

		// we compute LCA(p, q) using the values in P
		for (i = log; i >= 0; i--)
			if (P[p][i] != -1 && P[p][i] != P[q][i])
				p = P[p][i];
		q = P[q][i];

		return T[p];
	}

	void dfs(int x) {
		b[x] = true;
		start[x] = time++;
		for (Pair p : amp[x]) {
			int u = p.u;
			if (!b[u]) {
				L[u] = L[x] + 1;
				dfs(u);
			}
		}
		end[x] = time;
	}

	long ans = 0;

	void recur(int i, int k, long sum) {
		if (k > K)
			return;
		if (k == K) {
			ans = Math.max(ans, sum);
		}
		for (int j = i; j < N; j++) {

			recur(j + 1, k + 1, sum);
		}
	}

	long[] mul(long arr[][], long temp[]) {
		long ans[] = new long[temp.length];
		for (int i = 0; i < arr.length; i++) {
			long sum = 0;
			for (int j = 0; j < arr.length; j++) {
				sum = (sum + arr[i][j] * temp[j]) % MOD;
			}
			ans[i] = sum;
		}
		return ans;
	}

	void printMat(long arr[][]) {
		for (int i = 0; i < arr.length; i++) {
			for (int j = 0; j < arr.length; j++) {
				System.out.print(arr[i][j] + " ");
			}
			System.out.println();
		}
		System.out.println("-----");
	}

	void printMat(long arr[]) {
		for (int i = 0; i < arr.length; i++) {
			System.out.print(arr[i] + " ");
		}
		System.out.println();
		System.out.println("-----");
	}

	long[][] matMul(int n, long arr[][], long y) {
		long iden[][] = new long[n][n];
		for (int i = 0; i < n; i++)
			iden[i][i] = 1;
		// printMat(iden);
		while (y > 0) {
			if (y % 2 == 1) {
				iden = mul(n, iden, arr);
				// printMat(iden);
				y--;
			} else {
				arr = mul(n, arr, arr);
				// printMat(arr);
				y /= 2;
			}
		}
		return iden;
	}

	long[][] mul(int n, long a1[][], long a2[][]) {
		long temp[][] = new long[n][n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				long sum = 0;
				for (int k = 0; k < n; k++) {
					sum = (sum + a1[i][k] * a2[k][j]) % MOD;
				}
				temp[i][j] = sum;
			}
		}
		return temp;
	}

	void seive(int n) {
		b = new boolean[n + 1];
		prime = new int[n + 1];
		for (int i = 2; i * i <= n; i++) {
			if (!b[i]) {
				for (int j = 2 * i; j <= n; j += i) {
					if (!b[j]) {
						b[j] = true;
						prime[j] = i;
					}
				}
			}
		}
	}

	int binarySearch1(int arr[], int x) {
		int ans = -1;
		int low = 0, high = arr.length - 1;
		while (high >= low) {
			int mid = (low + high) / 2;
			if (arr[mid] >= x) {
				ans = mid;
				high = mid - 1;
			} else
				low = mid + 1;
		}
		return ans;
	}

	int binarySearch2(Integer arr[], int x) {
		int ans = -1;
		int low = 0, high = arr.length - 1;
		while (high >= low) {
			int mid = (low + high) / 2;
			if (arr[mid] >= x) {
				ans = mid;
				low = mid + 1;
			} else
				high = mid - 1;
		}
		return ans + 1;
	}

	int cntEven(String str) {
		int cnt = 0;
		for (int i = str.length() - 1; i >= 0; i--) {
			if ((str.charAt(i) - '0') % 2 == 0) {
				cnt++;
			}
		}
		return cnt;
	}

	int max = 0;

	int getParent(int x) {
		// System.out.println(x+" "+parent[x]);
		if (parent[x] != x) {
			parent[x] = getParent(parent[x]);
		}
		return parent[x];
	}

	class Pair implements Comparable<Pair> {
		int u;
		int v, r, i;

		Pair(int u, int v, int r, int i) {
			this.u = u;
			this.v = v;
			this.r = r;
			this.i = i;
		}

		Pair(int u, int v, int r) {
			this.u = u;
			this.v = v;
			this.r = r;
		}

		Pair(int u, int v) {
			this.u = u;
			this.v = v;
		}

		public int hashCode() {
			return Objects.hash();
		}

		public boolean equals(Object o) {
			Pair other = (Pair) o;
			return ((u == other.u && v == other.v));// || (v == other.u && u ==
			// other.v));
		}

		public int compareTo(Pair other) {
			//return Long.compare(r, other.r);
			 return Long.compare(u, other.u) != 0 ? (Long.compare(u, other.u))
			 : (Long.compare(v, other.v));
			// :(Long.compare(other.r, r))) ;
		}

	}

	int min(int x, int y) {
		if (x < y)
			return x;
		return y;
	}

	int max(int x, int y) {
		if (x > y)
			return x;
		return y;
	}

	void buildGraph(int m) {
		while (m-- > 0) {
			int x = ni() - 1, y = ni() - 1, r = ni();
			amp[x].add(new Pair(y, r));
			amp[y].add(new Pair(x, r));
			prr1[m] = new Pair(x, y, r);
		}
	}

	long modInverse(long a, long mOD2) {
		return power(a, mOD2 - 2, mOD2);
	}

	long power(long x, long y, long m) {
		if (y == 0)
			return 1;
		long p = power(x, y / 2, m) % m;
		p = (p * p) % m;

		return (y % 2 == 0) ? p : (x * p) % m;
	}

	boolean isPrime(int x) {
		for (int i = 2; i * 1L * i <= x; i++)
			if (x % i == 0)
				return false;
		return true;
	}

	public long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	void failFn(String str, int arr[]) {
		int len = 0;
		arr[0] = 0;
		int i = 1;
		while (i < arr.length) {
			if (str.charAt(i) == str.charAt(len)) {
				arr[i++] = ++len;
				continue;
			}
			if (len == 0) {
				arr[i] = len;
				i++;
				continue;
			}
			if (str.charAt(i) != str.charAt(len)) {
				len = arr[len - 1];
			}
		}
	}

	static class ST1 {
		int arr[], st[], size;

		ST1(int a[]) {
			arr = a.clone();
			size = 10 * arr.length;
			st = new int[size];
			build(0, arr.length - 1, 1);
		}

		void build(int ss, int se, int si) {
			if (ss == se) {
				st[si] = arr[ss];
				return;
			}
			int mid = (ss + se) / 2;
			int val = 2 * si;
			build(ss, mid, val);
			build(mid + 1, se, val + 1);
			st[si] = (st[val] + st[val + 1]);
		}

		int get(int ss, int se, int l, int r, int si) {
			if (l > se || r < ss || l > r)
				return Integer.MAX_VALUE;
			if (l <= ss && r >= se)
				return st[si];
			int mid = (ss + se) / 2;
			int val = 2 * si;
			return (get(ss, mid, l, r, val) + get(mid + 1, se, l, r, val + 1));
		}
	}

	static class ST {
		int arr[], lazy[], n;

		ST(int a) {
			n = a;
			arr = new int[10 * n];
			lazy = new int[10 * n];
		}

		void up(int l, int r, int val) {
			update(0, n - 1, 0, l, r, val);
		}

		void update(int l, int r, int c, int x, int y, int val) {
			if (lazy[c] != 0) {
				lazy[2 * c + 1] ^= lazy[c];
				lazy[2 * c + 2] ^= lazy[c];
				if (l == r)
					arr[c] ^= lazy[c];
				lazy[c] = 0;
			}
			if (l > r || x > y || l > y || x > r)
				return;
			if (x <= l && y >= r) {
				if ((r - l + 1) % 2 == 1)
					lazy[c] ^= val;
				return;
			}
			int mid = l + r >> 1;
		update(l, mid, 2 * c + 1, x, y, val);
		update(mid + 1, r, 2 * c + 2, x, y, val);
		arr[c] = (arr[2 * c + 1] + arr[2 * c + 2]);
		}

		int an(int ind) {
			return ans(0, n - 1, 0, ind);
		}

		int ans(int l, int r, int c, int ind) {
			if (lazy[c] != 0) {
				lazy[2 * c + 1] += lazy[c];
				lazy[2 * c + 2] += lazy[c];
				if (l == r)
					arr[c] += lazy[c];
				lazy[c] = 0;
			}
			if (l == r)
				return arr[c];
			int mid = l + r >> 1;
		if (mid >= ind)
			return ans(l, mid, 2 * c + 1, ind);
		return ans(mid + 1, r, 2 * c + 2, ind);
		}
	}
	static long[] array;
	public static class FenwickTree {

		 // 1-indexed array, In this array We save cumulative
		// information to perform efficient range queries and
		// updates

		public FenwickTree(int size) {
			array = new long[size + 1];
		}
		int getSum(int index)
		{
			int sum = 0; // Iniialize result

			// index in BITree[] is 1 more than the index in arr[]
			index = index + 1;

			// Traverse ancestors of BITree[index]
			while (index>0)
			{
				// Add current element of BITree to sum
				sum ^= array[index];

				// Move index to parent node in getSum View
				index -= index & (-index);
			}
			return sum;
		}
		public long rsq(int ind) {
			assert ind > 0;
			long sum = 0;
			ind = ind+1;
			while (ind > 0) {
				sum ^= array[ind];
				// Extracting the portion up to the first significant one of the
				// binary representation of 'ind' and decrementing ind by that
				// number
				ind -= ind & (-ind);
			}
			return sum;
		}

		public long rsq(int a, int b) {
			assert b >= a && a > 0 && b > 0;
			return rsq(b) ^ rsq(a - 1);
		}

		public void update(int ind, long value) {
			assert ind > 0;
			ind = ind+1;
			while (ind < array.length) {
				array[ind] ^= value;
				// Extracting the portion up to the first significant one of the
				// binary representation of 'ind' and incrementing ind by that
				// number
				ind += ind & (-ind);
			}
		}

		public int size() {
			return array.length - 1;
		}
	}

	public static int[] shuffle(int[] a, Random gen) {
		for (int i = 0, n = a.length; i < n; i++) {
			int ind = gen.nextInt(n - i) + i;
			int d = a[i];
			a[i] = a[ind];
			a[ind] = d;
		}
		return a;
	}

	long power(long x, long y, int mod) {
		long ans = 1;
		while (y > 0) {
			if (y % 2 == 0) {
				x = (x * x) % mod;
				y /= 2;
			} else {
				ans = (x * ans) % mod;
				y--;
			}
		}
		return ans;
	}

	void soln() {
		is = System.in;
		out = new PrintWriter(System.out);
		long s = System.currentTimeMillis();
		solve();
		out.close();
		out.flush();
		tr(System.currentTimeMillis() - s + "ms");
	}

	// To Get Input
	// Some Buffer Methods
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = is.read(inbuf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}

	private int skip() {
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	private double nd() {
		return Double.parseDouble(ns());
	}

	private char nc() {
		return (char) skip();
	}

	private String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '
			// ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

	private void tr(Object... o) {
		if (!oj)
			System.out.println(Arrays.deepToString(o));
	}
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import java.util.Scanner;

/**
 *
 * @author shaolin
 */
public class A_331 {
    public static void main (String[] args) {
        int n;
        int[] x;
        int[] y;
        int i;
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        x = new int[n];
        y = new int[n];
        for(i=0;i<n;i++){
            x[i] = scanner.nextInt();
            y[i] = scanner.nextInt();
        }
        if(n==1) {
            System.out.println(-1);
        }
        else if(n==2) {
            if(x[0]!=x[1] && y[0]!=y[1]) {
                System.out.println(1);
            } else {
                System.out.println(-1);
            }
        }
        else if(n==3) {
            if(x[0]!=x[1] && y[0]!=y[1]) {
                System.out.println(1);
            }
            else if(x[0]!=x[2] && y[0]!=y[2]) {
                System.out.println(1);
            }
            else if(x[1]!=x[2] && y[1]!=y[2]) {
                System.out.println(1);
            } else {
                System.out.println(-1);
            }
        } else {
            System.out.println(1);
        }
    }
}

import java.io.*;
import java.util.*;
public class Contest596B {

	public static void main(String[] args) throws Exception{
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(f.readLine());

		int moves = 0;

		int[] goal = new int[N];

		StringTokenizer st = new StringTokenizer(f.readLine());

		for(int i = 0;i<N;i++){
			goal[i] = Integer.parseInt(st.nextToken());
		}

		int[] sim = new int[N];

		for(int i = 0;i<N;i++){
			for(int j = 0;j<Math.abs(sim[i]-goal[i]);j++){
				if(sim[i] > goal[i]){
					for(int k = i;k<N;k++){
						sim[k] --;
					}
				}
				else if(sim[i]<goal[i]){
					for(int k = i;k<N;k++){
						sim[k] ++;
					}
				}
				moves ++;
			}
		}
		System.out.println(moves);
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Rectangle {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter printWriter = new PrintWriter(System.out);
        int n = Integer.parseInt(br.readLine());
        if (n > 1) {
            int [] xs = new int[4];
            int [] ys = new int[4];
            for (int i = 0; i < n; i++) {
                StringTokenizer st = new StringTokenizer(br.readLine());
                xs[i] = Integer.parseInt(st.nextToken());
                ys[i] = Integer.parseInt(st.nextToken());
            }
            if (n == 3) {
                int idx = 1;
                for (int i = 1; i < 4; i++) {
                    if (xs[0] != xs[i] && ys[0] != ys[i]) {
                        idx = i;
                        break;
                    } else if (i == 3) {
                        idx = -1;
                    }
                }
                if (idx == -1) {
                    printWriter.println(Math.abs(xs[1] - xs[2]) * Math.abs(ys[1] - ys[2]));
                } else {
                    printWriter.println(Math.abs(xs[0] - xs[idx]) * Math.abs(ys[0] - ys[idx]));
                }

            }
            else if (n == 4) {
                int idx = 1;
                for (int i = 1; i < 4; i++) {
                    if (xs[0] != xs[i] && ys[0] != ys[i]) {
                        idx = i;
                        break;
                    }
                }
                printWriter.println(Math.abs(xs[0] - xs[idx]) * Math.abs(ys[0] - ys[idx]));
            }
            else if (n == 2 && xs[0] != xs[1] && ys[0] != ys[1]) {
                printWriter.println(Math.abs(xs[0] - xs[1]) * Math.abs(ys[0] - ys[1]));
            } else {
                printWriter.println(-1);
            }
        } else {
            printWriter.println(-1);
        }
        printWriter.flush();
        printWriter.close();
    }
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by Leonti on 2015-11-13.
 */
public class A {
    public static void main(String[] args){
        InputReader inputReader = new InputReader(System.in);
        PrintWriter printWriter = new PrintWriter(System.out, true);

        int n = inputReader.nextInt();

        int x1 = -1000;
        int y1 = -1000;
        int x2 = 1000;
        int y2 = 1000;

        if (n == 1) {
            printWriter.print(-1);
        } else {
            for (int i = 0; i < n; i++) {
                int x = inputReader.nextInt();
                int y = inputReader.nextInt();

                if (x > x1 && y > y1) {
                    x1 = x;
                    y1 = y;
                }
                if (x < x2 && y < y2) {
                    x2 = x;
                    y2 = y;
                }
            }

            if (x1 == x2 || y1 == y2) {
                printWriter.print(0);
            } else {
                printWriter.print((x1 - x2) * (y1 - y2));
            }
        }

        printWriter.close();
    }

    static class InputReader {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public char[][] nextCharTable(int rows, int columns) {
            char[][] table = new char[rows][];
            for (int i = 0; i < rows; ++i) {
                table[i] = next().toCharArray();
                assert table[i].length == columns;
            }
            return table;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(readLine());
            }
            return tokenizer.nextToken();
        }

        public String readLine() {
            String line;
            try {
                line = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }
    }
}

import java.util.HashSet;
import java.util.Iterator;
import java.util.Scanner;
import java.util.Set;

public class swimming_pool {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int no_of_vertices = in.nextInt();
		int len = 0,wid=0;

		if (no_of_vertices == 1)
		{
			System.out.print(-1);
			in.close();
		}
		else
		{

    		Set<Integer> x_set = new HashSet<Integer>();
			Set<Integer> y_set = new HashSet<Integer>();
			for(int i=0;i<no_of_vertices;i++)
			{
				in.nextLine();
				x_set.add(in.nextInt());
				y_set.add(in.nextInt());

			}
			Iterator<Integer> it_x = x_set.iterator();
			Iterator<Integer> it_y = y_set.iterator();
			while(it_x.hasNext())
			{
				len = Integer.parseInt(it_x.next().toString()) - len;
			}
			len = Math.abs(len);
			while(it_y.hasNext())
			{
				wid = Integer.parseInt(it_y.next().toString()) - wid;
			}
			wid = Math.abs(wid);
			if (len ==0 || wid ==0)
			{
				System.out.println(-1);
			}
			else
			{
				System.out.println(len*wid);
			}
			in.close();
		}
	}

}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package codeforce;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Scanner;
import java.util.Vector;
import java.lang.*;
import java.math.BigInteger;

/**
 *
 * @author Nahian Islam Rahat
 */
public class Codeforces {

    public static void main(String[] args) throws FileNotFoundException, IOException {

        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        int w=0;
        int l=0;

        if(n==1) System.out.println(-1);

        else
        {
            int[][] arr = new int[n][2];

            for(int i=0;i<n;i++)
            {
                arr[i][0] = scanner.nextInt();
                arr[i][1] = scanner.nextInt();
            }

            for(int i=0;i<n;i++)
            {
                for(int j=i+1;j<n;j++)
                {
                    if(arr[i][0]!=arr[j][0]) w=arr[i][0]-arr[j][0];
                    if(arr[i][1]!=arr[j][1]) l=arr[i][1]-arr[j][1];
                }
            }

            System.out.println(Math.abs(w*l));

        }

        scanner.close();

    }

}

import java.util.Scanner;

public class WilburSwimmingPool {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        if (n == 1)
            System.out.println("-1");
        else {
            int maxx = -1001;
            int minx = 1001;
            int maxy = -1001;
            int miny = 1001;
            for (int i = 0; i < n; i++) {
                int x = in.nextInt(), y = in.nextInt();
                if (minx > x)
                    minx = x;
                if (maxx < x)
                    maxx = x;
                if (miny > y)
                    miny = y;
                if (maxy < y)
                    maxy = y;
            }
            if (n != 2)
                System.out.println((maxx - minx) * (maxy - miny));
            else if (minx!=maxx)
                System.out.println((maxx - minx) * (maxy - miny));
            else
            System.out.println("-1");
        }
    }
}

//package Codeforces.Div2A_331.Code1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/*
 * some cheeky quote
 */

public class Main
{
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException
    {
        int n = in.nextInt();
        if (n <= 1)
        {
            System.out.println(-1);
        } else if (n == 2)
        {
            Point a = new Point(in.nextInt(), in.nextInt());
            Point b = new Point(in.nextInt(), in.nextInt());
            if (a.x != b.x && a.y != b.y)
            {
                System.out.println(Math.abs(a.x - b.x) * Math.abs(a.y - b.y));
            } else
            {
                System.out.println(-1);
            }
        } else if (n == 3)
        {
            Point a[] = new Point[3];
            for (int i = 0; i < a.length; i++)
            {
                int x = in.nextInt();
                int y = in.nextInt();
                a[i] = new Point(x, y);
            }
            Arrays.sort(a);

            Point first = a[0];
            Point mid = a[1];
            Point last = a[2];

            if ((mid.x == last.x && mid.y == first.y) || (mid.x == first.x && mid.y == last.y))
            {
                System.out.println(Math.abs(first.x - last.x) * Math.abs(first.y - last.y));
            } else
            {
                System.out.println(-1);
            }
        } else
        {
            Point a[] = new Point[4];
            for (int i = 0; i < a.length; i++)
            {
                int x = in.nextInt();
                int y = in.nextInt();
                a[i] = new Point(x, y);
            }

            Arrays.sort(a);

            if (Math.abs(a[0].x - a[1].x) == Math.abs(a[2].x - a[3].x) && Math.abs(a[0].y - a[2].y) == Math.abs(a[1].y - a[3].y))
            {
                System.out.println(Math.abs(a[0].x - a[1].x) * Math.abs(a[0].y - a[2].y));
            } else
            {
                System.out.println(-1);
            }

        }

    }

    public void run()
    {
        try
        {
            in = new FastScanner();
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e)
        {
            e.printStackTrace();
        }
    }

    class FastScanner
    {
        BufferedReader br;
        StringTokenizer st;

        FastScanner()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreTokens())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg)
    {
        new Main().run();
    }
}

class Point implements Comparable<Point>
{
    int x;
    int y;

    Point(int x, int y)
    {
        this.x = x;
        this.y = y;
    }

    public int compareTo(Point that)
    {
        if (this.x == that.x)
        {
            return this.x - that.x;
        }
        return this.y - that.y;
    }
}

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while( in.hasNext() ) {
			int n = in.nextInt();
			int[] x = new int[n];
			int[] y = new int[n];
			for( int i = 0 ; i < n ; i++ ) {
				x[i] = in.nextInt();
				y[i] = in.nextInt();
			}
			if( n < 2 ) System.out.println(-1);
			else if( n == 2 ){
				if( x[0] == x[1] || y[0] == y[1] ) System.out.println(-1);
				else System.out.println( Math.abs((x[0]-x[1])*(y[0]-y[1])) );
			} else if( n == 3 ) {
				boolean ansed = false;
				for( int i = 0 ; i < 3 ; i++ ) {
					int j = (i+1>2)?(i-2):i+1;
					int k = (i+2>2)?i-1:i+2;
					System.out.println(i+" "+j+" "+k);
					if( (x[i] == x[j] && y[i] == y[k]) || ( x[i] == x[k] && y[i] == y[j] ) ) {
						ansed = true;
						System.out.println(Math.abs((x[j]-x[k])*(y[j]-y[k])));
						break;
					}
				}
				if( !ansed )
					System.out.println(-1);
			} else {
				boolean ansed = false;
				for( int i = 1 ; i < 4 ; i++ ) {
					if( (x[0] != x[i]) && ( y[0] != y[i] ) ) {
						ansed = true;
						System.out.println(Math.abs((x[0]-x[i])*(y[0]-y[i])));
						break;
					}
				}
				if( !ansed )
					System.out.println(-1);
			}
		}
	}
}

//package CodeForces.Round331;

import java.util.Scanner;
import java.util.TreeMap;

/**
 * Created by ilya on 15.11.15.
 */
public class A596 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        switch (n){
            case 1:
                System.out.println(-1);
                break;
            case 2:
                int aX = sc.nextInt();
                int aY = sc.nextInt();
                int bX = sc.nextInt();
                int bY = sc.nextInt();
                if(aX == bX || aY == bY){
                    System.out.println(-1);
                    break;
                }
                System.out.println(getS(aX,aY,bX,bY));
                break;
            case 3:
            case 4:
                TreeMap<Integer, Integer> points = new TreeMap<>();
                for (int i = 0; i < n; i++) {
                    int a1 = sc.nextInt();
                    int b1 = sc.nextInt();
                    //points.put(a1,b1);
                    if(!points.containsKey(a1))points.put(a1,b1);
                    else if(points.containsKey(a1) && points.lastEntry().getValue()!= b1 && points.firstEntry().getValue()!= b1) points.put(a1,b1);
                }
                System.out.println(getS(points.firstEntry().getKey(), points.firstEntry().getValue(), points.lastEntry().getKey(),points.lastEntry().getValue()));
                break;
        }

    }

    public static int getS(int aX, int aY, int bX, int bY){
            return Math.abs(Math.abs(Math.max(aX, bX)) - (aX<0&&bX<0?Math.min(aX, bX):Math.abs(Math.min(aX, bX))))*Math.abs(Math.abs(Math.max(aY, bY)) - (aY<0 && bY<0?Math.min(aY, bY):Math.abs(Math.min(aY, bY))));
    }
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A {

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        int[] x = new int[n], y = new int[n];
        for(int i = 0; i < n; ++i)
        {
            x[i] = sc.nextInt();
            y[i] = sc.nextInt();
        }
        for(int i = 0; i < n; ++i)
            for(int j = i + 1; j < n; ++j)
                if(x[i] != x[j] && y[i] != y[j])
                {
                    out.println((x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]));
                    out.flush();
                    out.close();
                    return;
                }
        out.println(-1);
        out.flush();
        out.close();
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(FileReader fileReader) throws FileNotFoundException{ br = new BufferedReader(fileReader);}

        public Scanner(InputStream s) throws FileNotFoundException{ br = new BufferedReader(new InputStreamReader(s));}

        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public int nextInt() throws IOException {return Integer.parseInt(next());}

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public boolean ready() throws IOException {return br.ready(); }

    }

}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package codeforces6;

import java.util.Scanner;

/**
 *
 * @author vladik
 */
public class MainA {

    public static class First{
        public int n;
        public int[] x, y;
        public First(){
            Scanner scan = new Scanner(System.in);
            n = scan.nextInt();
            x = new int[n];
            y = new int[n];
            for(int i = 0; i< n; i++){
                x[i] = scan.nextInt();
                y[i] = scan.nextInt();
            }

        }
        public int count(){
            if( n == 1){
                return -1;
            } else if( n == 2){
                if(x[0] != x[1] && y[0] != y[1]){
                    return Math.abs( (x[0] - x[1])*(y[0] - y[1]));
                } else {
                    return -1;
                }
            } else{
                for( int i = 0; i < n-1; i++){
                    int x0 = x[i];
                    int y0 = y[0];
                    for( int j = i+1; j < n; j++){
                        if(x0 != x[j] && y0 != y[j]){
                            return Math.abs( (x[0] - x[1])*(y[0] - y[1]));
                        }
                    }
                }
                return -1;
            }
        }
    }

    public static void main(String[] args){
        First a = new First();
        System.out.println(a.count());
    }
}

import java.io.*;
import java.util.Locale;
import java.util.StringTokenizer;

public class Solution implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
            long t2 = System.currentTimeMillis();
            System.err.println("Time = " + (t2 - t1));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }
    // solution

    void solve() throws IOException {
        int pointCount = readInt();
        int[][] a = new int[2][pointCount];
        for(int i=0;i<pointCount;i++){
            a[0][i] = readInt();
            a[1][i] = readInt();
        }
        if(pointCount <= 1) {
            out.println("-1");
        } else if(pointCount >= 3){
            out.println("1");
        } else {
            if(a[0][0] != a[1][0] && a[0][1] != a[1][1]){
                out.println("1");
            } else {
                out.println("-1");
            }
        }
    }

}

import java.util.*;
public class Codef{
    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        int n=in.nextInt(),x,y,a,b;
        int[][] ar=new int[n][2];
        for (int i=0; i<n; i++){
            ar[i][0]=in.nextInt();
            ar[i][1]=in.nextInt();
        }
        if ((n==1)||((n==2)&((ar[1][0]==ar[0][0])|(ar[1][1]==ar[0][1])))){
            System.out.println(-1);
            return;
        }
        for (int i=1; i<n; i++){
            if ((ar[0][0]!=ar[i][0])&(ar[0][1]!=ar[i][0])){
                System.out.println(Math.abs(ar[0][0]-ar[i][0])*Math.abs(ar[0][1]-ar[i][1]));
                return;
            }
        }
    }
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by peacefrog on 11/15/15.
 * Time : 10:33 PM
 */

public class Task_A {
	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	PrintWriter out;
	long timeBegin, timeEnd;

	public void runIO() throws IOException {
		timeBegin = System.currentTimeMillis();

		InputStream inputStream;
		OutputStream outputStream;

		if (ONLINE_JUDGE) {
			inputStream = System.in;
			Reader.init(inputStream);
			outputStream = System.out;

			out = new PrintWriter(outputStream);

		} else {
			inputStream = new FileInputStream("/home/peacefrog/Dropbox/IdeaProjects/Problem Solving/input");
			Reader.init(inputStream);
			out = new PrintWriter("output.txt");
		}

		solve();

		out.flush();
		out.close();
		timeEnd = System.currentTimeMillis();

		System.err.println("Time = " + (timeEnd - timeBegin));

	}

	/*
	 * Start Solution Here
	 */

	private void solve() throws IOException {
		int n = Reader.nextInt(); //This Variable default in Code Templete
		int[]x = new int[4];
		int y [] = new int[4];

		if(n==1) {
			x[0] = Reader.nextInt();
			y[0] = Reader.nextInt();
			System.out.println(-1);
			return;
		}
		if(n==2)
		{
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				y[i] = Reader.nextInt();
			}

			x[2] = x[1];
			y[2] = y[0];

			int len1 = (int) Math.sqrt(Math.pow(x[0]-x[2] , 2) + Math.pow(y[0]-y[2] , 2));
			int len2 = (int) Math.sqrt(Math.pow(x[1]-x[2] , 2) + Math.pow(y[1]-y[2] , 2));
			System.out.println(len1 * len2);
			return;
		}
		if (n==3 )
		{
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				y[i] = Reader.nextInt();
			}
			int len1 = (int) Math.sqrt(Math.pow(x[0]-x[2] , 2) + Math.pow(y[0]-y[2] , 2));
			int len2 = (int) Math.sqrt(Math.pow(x[1]-x[2] , 2) + Math.pow(y[1]-y[2] , 2));
			System.out.println(len1 * len2);
			return;
		}
		if(n ==4 )
		{
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				y[i] = Reader.nextInt();
			}
			int len1 = (int) Math.sqrt(Math.pow(x[0]-x[2] , 2) + Math.pow(y[0]-y[2] , 2));
			int len2 = (int) Math.sqrt(Math.pow(x[1]-x[2] , 2) + Math.pow(y[1]-y[2] , 2));
			System.out.println(len1 * len2);
		}

	}

	public static void main(String[] args) throws IOException {

		new Task_A().runIO();
	}

	static class Reader {
		static BufferedReader reader;
		static StringTokenizer tokenizer;

		/**
		 * call this method to initialize reader for InputStream
		 */
		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer("");
		}

		/**
		 * get next word
		 */
		static String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		static String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return "";
		}

		static int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		static long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		static double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
	}

}

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int x =-1;
		int y =-1;
		int area = 0 ;
		if(n == 1)
			{
				int t = in.nextInt();
				t = in.nextInt();
				System.out.println("-1");
			}
		else if(n==2)
		{
			x = in.nextInt();
			y = in.nextInt();
			int tempx = in.nextInt();
			int tempy = in.nextInt();
			x = Math.abs(x - tempx);
			y = Math.abs(y - tempy);
			if(x == 0 || y == 0) System.out.println("-1");
			else
			{
				area = x*y;
				System.out.println(area);
			}
		}
		else
		{
			x = in.nextInt();
			y = in.nextInt();
			n--;
			int dx = -1;
			int dy = -1;
			while(n-- > 0)
			{
				int tempx = in.nextInt();
				int tempy = in.nextInt();
				x = Math.abs(x - tempx);
				y = Math.abs(y - tempy);
				if( x > dx ) dx = x;
				if( y > dy ) dy = y;
			}
			area = dx*dy;
			System.out.println(area);
		}
	}

}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class A {

    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer tok;

    public static void main(String[] args) throws IOException {
        try {
            in = new BufferedReader(new FileReader("diameter.in"));
            out = new PrintWriter(new File("diameter.out"));
        } catch (Exception e) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(new OutputStreamWriter(System.out));
        }
        tok = new StringTokenizer("");
        new A().solve();
        out.flush();
        out.close();
    }

    String nextTok() throws IOException {
        if (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextTok());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextTok());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextTok());
    }

    static class Pair implements Comparable<Pair>  {
        int x;
        int y;

        Pair (int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Pair o) {
            if (x < o.x) return -1;
            if (x > o.x) return 1;
            if (y < o.y) return -1;
            if (y > o.y) return 1;
            return 0;
        }
    }

    void solve() throws IOException {
        int n = nextInt();
        Pair[] m = new Pair[n];
        for (int i = 0; i < n; i++) {
            int a = nextInt();
            int b = nextInt();
            m[i] = new Pair(a,b);
        }
        Arrays.sort(m);
        if (n == 1) {
            System.out.println(-1);
            return;
        }
        if (n == 2) {
            if (m[0].x != m[1].x  && m[0].y != m[1].y) {
                System.out.println(1);
                return;
            } else {
                System.out.println(-1);
                return;
            }
        }

        System.out.println(1);

    }

    private BigInteger catalan (int i) {

        return factorial(2 * i).divide((factorial(i + 1).multiply(factorial(i))));
    }

    private BigInteger factorial (int i) {
        BigInteger n = BigInteger.valueOf(i);
        if (i == 0) {
            return new BigInteger("1");
        }
        while (--i > 0) {
            n = n.multiply(BigInteger.valueOf(i));
        }
        return n;
    }
}

//

import java.util.Scanner;

public class ProblemWilbur
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);

        int area;
        int lado1=0;
        int lado2=0;
        int numero = sc.nextInt();

        int[] coordenadasX = new int[numero];
        int[] coordenadasY = new int[numero];

        for(int i=0; i<=numero-1; i++)
        {
        	coordenadasX[i] = sc.nextInt();
        	coordenadasY[i] = sc.nextInt();
        }

        if(numero == 1)
        {
            System.out.println("-1");
        }
        if(numero!=1)
        {
        	if(numero==2)
        	{
        		if(coordenadasX[0]==coordenadasX[1] || coordenadasY[0]==coordenadasY[1])System.out.println("-1");
        		else
        		{
        			area = Math.abs((coordenadasX[0]-coordenadasX[1])*(coordenadasY[0]-coordenadasY[1]));
                    System.out.println(area);
        		}
        	}
        	if(numero==3)
        	{
        		if(coordenadasX[0]!=coordenadasX[1])
        		{
        			lado1= coordenadasX[1]-coordenadasX[0];
        			lado2= coordenadasY[2]-coordenadasY[0];
        		}
        		else
        		{
        			lado2 = coordenadasY[1]-coordenadasY[0];
        			lado1 = coordenadasX[2]-coordenadasX[1];
        		}
        		area = Math.abs(lado1*lado2);
                System.out.println(area);
        	}
            if(numero==4)
            {
               for(int i=0; i<3; i++)
               {
                    if(coordenadasX[i]!=coordenadasX[i+1])
                    {
                        lado1= Math.abs(coordenadasX[i])-Math.abs(coordenadasX[i+1]);
                        break;
                    }
               }
                for(int i=0; i<3; i++)
               {
                    if(coordenadasX[i]!=coordenadasX[i+1])
                    {
                        lado1= Math.abs(coordenadasX[i])-Math.abs(coordenadasX[i+1]);
                        break;
                    }
               }
                area = Math.abs(lado1*lado2);
                System.out.println(area);
            }
        }

    }

}

import java.util.Scanner;
public class A
{
    public int calc(int x1,int y1,int x2,int y2)
    {
        return Math.abs((x1 - x2)) * Math.abs((y1 - y2));
    }
    public void solve()
    {
        Scanner cin = new Scanner(System.in);
        int n = cin.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];

        for(int i = 0;i < n;i++)
        {
            x[i] = cin.nextInt();
            y[i] = cin.nextInt();
        }

        if((n == 1 )|| (n == 2 && (x[0] == x[1]) || (y[0] == y[1])))
        {
            System.out.println(-1);
        }else
        {
            if(n == 2)
            {
                System.out.println(calc(x[0],y[0],x[1],y[1]));
            }else if(n == 3)
            {
                if(x[0] == x[1] || y[0] == y[1])
                {
                    if(x[0] == x[2] || y[0] == y[2])
                    {
                        System.out.println(calc(x[1],y[1],x[2],y[2]));
                    }else
                    {
                        System.out.println(calc(x[0],y[0],x[2],y[2]));
                    }
                }else if(x[1] == x[2] || y[1] == y[2])
                {
                    if(x[1] == x[0] || y[1] == y[0])
                    {
                        System.out.println(calc(x[2],y[2],x[0],y[0]));
                    }else if(x[2] == x[0] || y[2] == y[0])
                    {
                        System.out.println(calc(x[1],y[1],x[0],y[0]));
                    }
                }else
				{
					System.out.println(calc(x[0],y[0],x[2],y[2]));
				}
            }else
            {
                if((x[0] != x[1] && y[0] != y[1]))
                {
                    System.out.println(calc(x[0],y[0],x[1],y[1]));
                }else if(x[0] != x[2] && y[0] != y[2])
                {
                    System.out.println(calc(x[0],y[0],x[2],y[2]));
                }else
                {
                    System.out.println(calc(x[0],y[0],x[3],y[3]));
                }
            }
        }
    }
    public static void main(String[] args)
    {
        new A().solve();
    }
}

import java.util.Scanner;

public class Wilbur {
	public static void main(String ... arg){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		long[] x= new long[n];
		long[] y = new long[n];
		long area = 0;
		int count1 = 1, count2 = 1;
		long x1 = 0, x2 = 0, y1 = 0, y2 = 0;
		for(int i=0;i<n;i++){
			x[i] = s.nextLong();
			y[i] = s.nextLong();

			x1 = x[0];
			y1 = y[0];
			if(n == 1)
				System.out.println("-1");
			else{
				if(i!=0){
					if(x[i]!=x[i-1] && y[i]!=y[i-1]){
						count1++;
						count2++;
						x2 = x[i];
						y2 = y[i];
					}
					else if(x[i]==x[i-1] && y[i]!=y[i-1]){
						count2++;
						y2 = y[i];
					}
					else if(x[i]!=x[i-1] && y[i]==y[i-1]){
						count2++;
						x2 = x[i];
					}

				}

			}
		}
		if(count1>=2 || count2>=3){
			area = Math.abs(x2-x1)*Math.abs(y2-y1);
			System.out.println(area);
		}
		else
			System.out.println("-1");
	}

}

import java.util.*;
public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int v = sc.nextInt(), restax, restay, x, y, x1, y1 = 0, x2, y2, x3, y3, resta, mult = 0;
		if(v == 1)
			System.out.println("-1");
			else {
				if(v == 2){
					x = sc.nextInt() + 10000;
					y = sc.nextInt() + 10000;
					x1 = sc.nextInt() + 10000;
					y1 = sc.nextInt() + 10000;
					restay = y1 - y;
					restax = x1 - x;
					mult = (restax)*(restay);
					if(mult == 0)
						System.out.println("-1");
					else {
						if(mult < 0)
							mult= mult*-1;
						System.out.println(mult);
					}
				} else {
					if(v == 3){
						x = sc.nextInt() + 1000;
						y = sc.nextInt() + 1000;
						x1 = sc.nextInt() + 1000;
						y1 = sc.nextInt() + 1000;
						x2 = sc.nextInt() + 1000;
						y2 = sc.nextInt() + 1000;
					if((x-x1) == 0){
						restay = y - y1;
						restax = x - x2;
						mult = restay*restax;
					} else {
						restax = x - x1;
						restay = y - y2;
						mult = restay*restax;
					}
						if(mult == 0)
							System.out.println("-1");
						else {
							if(mult < 0)
								mult= mult*-1;
							System.out.println(mult);
					}
					} else {
						x = sc.nextInt() + 1000;
						y = sc.nextInt() + 1000;
						x1 = sc.nextInt() + 1000;
						y1 = sc.nextInt() + 1000;
						x2 = sc.nextInt() + 1000;
						y2 = sc.nextInt() + 1000;
						x3 = sc.nextInt() + 1000;
						y3 = sc.nextInt() + 1000;
						if((x-x1) == 0){
							restay = y - y1;
							restax = x - x2;
							mult = restay*restax;
							} else {
							restax = x - x1;
							restay = y - y2;
							mult = restay*restax;
							}
						if(mult == 0)
							System.out.println("-1");
						else {
							if(mult < 0)
								mult= mult*-1;
							System.out.println(mult);
					}
					}
				}
			}
	}
}

import java.io.*;
import java.util.*;

public class Contest596A {

	public static void main(String[] args) throws Exception {
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(f.readLine());
		if(N==1) System.out.println(-1);
		int[][] coords = new int[N][2];

		for(int i = 0;i<N;i++){
			StringTokenizer st = new StringTokenizer(f.readLine());
			coords[i] = new int[]{Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken())};
		}

		if(N == 2){
			int x1 = coords[0][0];
			int y1 = coords[0][1];
			int x2 = coords[1][0];
			int y2 = coords[1][1];

			if(x1 != x2 && y1 != y2){
				System.out.println(Math.abs(x1-x2)*Math.abs(y1-y2));
			}
			else System.out.println(-1);
		}
		else{
			int x1 = -1001,x2 = -1001;
			int y1 = -1001,y2 = -1001;
			boolean found = false;
			for(int i = 0;i<N;i++){
				if(!found){
					x1 = coords[i][0];
					y1 = coords[i][1];
					found = true;
				}
				else{
					if(x2 == -1001 && coords[i][0] != x1) x2 = coords[i][0];
					if(y2 == -1001 && coords[i][1] != y1) y2 = coords[i][1];
				}
			}
			System.out.println(Math.abs(x1-x2)*Math.abs(y1-y2));
		}
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class wilbur {
	public static void main(String[] args) throws IOException {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(read.readLine());
		int ans = 0;
		if (n == 1) {
			ans = -1;
		} else {
			if (n == 3 || n == 4) {
				ans = 1;
			} else {
				StringTokenizer token = new StringTokenizer(read.readLine());
				int a = Integer.parseInt(token.nextToken()), b = Integer.parseInt(token.nextToken());
				token = new StringTokenizer(read.readLine());
				int a2 = Integer.parseInt(token.nextToken()), b2 = Integer.parseInt(token.nextToken());
				if (a == a2 || b == b2) {
					ans = -1;
				} else {
					ans = 1;
				}
			}
		}
		System.out.println(ans);
	}
}

import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),ans;
		int[][] data = new int[n][2];

		for(int i=0;i<n;i++)
		{
			data[i][0] = sc.nextInt();
			data[i][1] = sc.nextInt();
		}

		if(n==1)
			System.out.println("-1");
		else if(n==2)
		{
			if(data[0][0]==data[1][0] || data[0][1]==data[1][1])
				System.out.println("-1");
			else
				System.out.println(Math.abs(data[0][0]-data[1][0])*Math.abs(data[0][1]-data[1][1]));
		}
		else if(n==3)
		{
			double dist1,dist2,dist3;
			dist1 = Math.sqrt(data[0][0]-data[1][0])+Math.sqrt(data[0][1]-data[1][1]);
			dist2 = Math.sqrt(data[0][0]-data[2][0])+Math.sqrt(data[0][1]-data[2][1]);
			dist3 = Math.sqrt(data[1][0]-data[2][0])+Math.sqrt(data[1][1]-data[2][1]);

			if(dist1==dist2+dist3)
			{
				System.out.println(dist2*dist3);
			}
			else if(dist2==dist3+dist1)
			{
				System.out.println(dist1*dist3);
			}
			else if(dist3==dist1+dist2)
			{
				System.out.println(dist1*dist2);
			}
			else
				System.out.println("-1");

			//int m1 = (data[0][1]-data[1][1])/(data[][])
//			if(data[0][0]==data[1][0] && data[1][1]==data[2][1])
//			{
//				System.out.println(Math.abs(data[0][0]-data[2][0])*Math.abs(data[0][1]-data[2][1]));
//				if(data[0][1]==data[2][1])
//					System.out.println(Math.abs(data[0][1]-data[1][1])*Math.abs(data[0][0]-data[2][0]));
//				else if(data[1][1]==data[2][1])
//					System.out.println(Math.abs(data[0][1]-data[1][1])*Math.abs(data[1][0]-data[2][0]));
//				else
//				System.out.println("-1");
//			}
//			else if(data[1][0]==data[2][0] && data[2][1]==data[0][1])
//			{
//				System.out.println(Math.abs(data[0][0]-data[1][0])*Math.abs(data[0][1]-data[1][1]));
//			}
//			else if(data[2][0]==data[0][0] || data[0][1]==data[1][1])
//			{
//				System.out.println(Math.abs(data[1][0]-data[2][0])*Math.abs(data[1][1]-data[2][1]));
//			}
//			else
//				System.out.println("-1");
		}
		else
		{
			double dist1,dist2,dist3;
			dist1 = Math.sqrt(data[0][0]-data[1][0])+Math.sqrt(data[0][1]-data[1][1]);
			dist2 = Math.sqrt(data[0][0]-data[2][0])+Math.sqrt(data[0][1]-data[2][1]);
			dist3 = Math.sqrt(data[0][0]-data[3][0])+Math.sqrt(data[0][1]-data[3][1]);

			if(dist1==dist2+dist3)
			{
				System.out.println(dist2*dist3);
			}
			else if(dist2==dist3+dist1)
			{
				System.out.println(dist1*dist3);
			}
			else if(dist3==dist1+dist2)
			{
				System.out.println(dist1*dist2);
			}
			else
				System.out.println("-1");
		}
		sc.close();
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args) {
        FastReader In = new FastReader();
        int n = In.nextInt();
        int[][] v = new int[n][2];
        for (int i = 0; i < n; i++) {
            v[i][0] = In.nextInt();
            v[i][1] = In.nextInt();
        }
        if(n < 2){
            System.out.println("-1");
        }else if(n == 2){
            if(v[0][0] == v[1][0] || v[0][1] == v[1][1]){
                System.out.println("-1");
            }else{
                System.out.println(Math.abs((v[0][0]-v[1][0])*(v[0][1]-v[1][1])));
            }
        }else if(n == 2){
            int a  = Math.max((v[0][0]-v[1][0]),(v[0][0]-v[2][0]));
            int b  = Math.max((v[0][1]-v[1][1]),(v[0][1]-v[2][1]));
            System.out.println(Math.abs(a*b));
        }
    }

}

import java.util.Scanner;

public class Wilbur {
	public static void main(String ... arg){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		long[] x= new long[n];
		long[] y = new long[n];
		long area = 0;
		int count1 = 1, count2 = 1;
		long x1 = 0, x2 = 0, y1 = 0, y2 = 0;
		for(int i=0;i<n;i++){
			x[i] = s.nextLong();
			y[i] = s.nextLong();

			x1 = x[0];
			y1 = y[0];

			{
				if(i!=0){
					if(x[i]!=x[i-1] && y[i]!=y[i-1]){
						count1++;
						count2++;
						x2 = x[i];
						y2 = y[i];
					}
					else if(x[i]==x[i-1] && y[i]!=y[i-1]){
						count2++;
						y2 = y[i];
					}
					else if(x[i]!=x[i-1] && y[i]==y[i-1]){
						count2++;
						x2 = x[i];
					}

				}

			}
		}
		if(count1>=2 || count2>=3){
			area = Math.abs(x2-x1)*Math.abs(y2-y1);
			System.out.println(area);
		}
		else
			System.out.println("-1");
	}

}

import java.io.*;
import java.lang.reflect.Array;
import java.math.*;
import java.security.KeyStore.Entry;
import java.util.*;

public class Main {
	private InputStream is;
	private PrintWriter out;
	int time = 0, dp[][], DP[][], dist[], prime[], start[], parent[], end[],
			val[], black[], arr[], arr1[][];
	long MOD = (long) (1e9 + 9);
	ArrayList<Pair>[] amp;
	boolean b[], b1[];
	Pair prr1[];
	char ch[][], c[];
	HashSet<Integer> hs1 = new HashSet<>(), hs2 = new HashSet<>();

	public static void main(String[] args) throws Exception {
		new Thread(null, new Runnable() {
			public void run() {
				try {

					// new Main().soln();
				} catch (Exception e) {
					System.out.println(e);
				}
			}
		}, "1", 1 << 26).start();
		new Main().soln();
	}

	int MAX = 1000010, N, K, p = 1;
	PriorityQueue<Pair> pq;
	int Dp[][] = new int[1010][1010];
	int MOD1 = 1000000007, MOD2 = 1000000009;
	void solve() {
		int n = ni();
		if(n==1){
			System.out.println(-1);
		}
		if(n==2){
			int x1 = ni(), y1 = ni(), x2 = ni(), y2 = ni();
			if(x1==x2 || y1==y2){
				System.out.println(-1);
			}
			else{
				System.out.println(Math.abs((x2-x1)*(y2-y1)));
			}
		}
		if(n==3){
			int x1 = ni(), y1 = ni(), x2 = ni(), y2 = ni(), x3 = ni(), y3 = ni();
			int w = 0, h = 0;
			if(x1==x2){
				h = Math.abs(y2-y1);
			}
			else if(x1==x3){
				h = Math.abs(y3-y1);
			}
			else h = Math.abs(y2-y1);
			if(y1==y2){
				w = Math.abs(x2-x1);
			}
			else if(y1==y3){
				w = Math.abs(x3-x1);
			}
			else w = Math.abs(x2-x1);
			System.out.println(h*w);
		}
		if(n==4){
			int x1 = ni(), y1 = ni(), x2 = ni(), y2 = ni(), x3 = ni(), y3 = ni(), x4 = ni(), y4 = ni();
			int w = 0, h = 0;
			if(x1==x2){
				h = Math.abs(y2-y1);
			}
			else if(x1==x3){
				h = Math.abs(y3-y1);
			}
			else h = Math.abs(y4-y1);
			if(y1==y2){
				w = Math.abs(x2-x1);
			}
			else if(y1==y3){
				w = Math.abs(x3-x1);
			}
			else w = Math.abs(x4-x1);

			System.out.println(h*w);
		}
	}
	class cell implements Comparable<cell>{
		char ch;
		int i;
		cell(char c, int x){
			ch = c;
			i = x;
		}
		public boolean equals(Object o) {
			cell other = (cell) o;
			return ((ch == other.ch && i == other.i));// || (v == other.u && u ==
			// other.v));
		}
		@Override
		public int compareTo(cell c) {
			if(this.ch<c.ch) return -1;
			if(this.ch==c.ch) {
				if(this.i<c.i)return 1;
				if(this.i==c.i) return 0;
				return -1;
			}
			return 1;
		}

		public String toString() {
			return "[u=" + ch + ", v=" + i + "]";
		}

	}
	int T[] = new int[100010], L[] = new int[100010];
	int P[][] = new int[100010][30];

	void process3(int N) {
		int i, j;

		// we initialize every element in P with -1
		for (i = 0; i < N; i++)
			for (j = 0; 1 << j < N; j++)
				P[start[i]][j] = -1;

		// the first ancestor of every node i is T[i]
		for (i = 0; i < N; i++)
			P[start[i]][0] = T[i];

		// bottom up dynamic programing
		for (j = 1; 1 << j < N; j++)
			for (i = 0; i < N; i++)
				if (P[start[i]][j - 1] != -1)
					P[start[i]][j] = P[P[start[i]][j - 1]][j - 1];
	}

	int query(int p, int q) {
		int tmp = 0, log = 0, i = 0;

		// if p is situated on a higher level than q then we swap them
		if (L[p] < L[q])
			tmp = p;
		p = q;
		q = tmp;

		// we compute the value of [log(L[p)]
		for (log = 1; 1 << log <= L[p]; log++)
			;
		log--;

		// we find the ancestor of node p situated on the same level
		// with q using the values in P
		for (i = log; i >= 0; i--)
			if (L[p] - (1 << i) >= L[q])
				p = P[p][i];

		if (p == q)
			return p;

		// we compute LCA(p, q) using the values in P
		for (i = log; i >= 0; i--)
			if (P[p][i] != -1 && P[p][i] != P[q][i])
				p = P[p][i];
		q = P[q][i];

		return T[p];
	}

	void dfs(int x) {
		b[x] = true;
		start[x] = time++;
		for (Pair p : amp[x]) {
			int u = p.u;
			if (!b[u]) {
				L[u] = L[x] + 1;
				dfs(u);
			}
		}
		end[x] = time;
	}

	long ans = 0;

	void recur(int i, int k, long sum) {
		if (k > K)
			return;
		if (k == K) {
			ans = Math.max(ans, sum);
		}
		for (int j = i; j < N; j++) {

			recur(j + 1, k + 1, sum);
		}
	}

	long[] mul(long arr[][], long temp[]) {
		long ans[] = new long[temp.length];
		for (int i = 0; i < arr.length; i++) {
			long sum = 0;
			for (int j = 0; j < arr.length; j++) {
				sum = (sum + arr[i][j] * temp[j]) % MOD;
			}
			ans[i] = sum;
		}
		return ans;
	}

	void printMat(long arr[][]) {
		for (int i = 0; i < arr.length; i++) {
			for (int j = 0; j < arr.length; j++) {
				System.out.print(arr[i][j] + " ");
			}
			System.out.println();
		}
		System.out.println("-----");
	}

	void printMat(long arr[]) {
		for (int i = 0; i < arr.length; i++) {
			System.out.print(arr[i] + " ");
		}
		System.out.println();
		System.out.println("-----");
	}

	long[][] matMul(int n, long arr[][], long y) {
		long iden[][] = new long[n][n];
		for (int i = 0; i < n; i++)
			iden[i][i] = 1;
		// printMat(iden);
		while (y > 0) {
			if (y % 2 == 1) {
				iden = mul(n, iden, arr);
				// printMat(iden);
				y--;
			} else {
				arr = mul(n, arr, arr);
				// printMat(arr);
				y /= 2;
			}
		}
		return iden;
	}

	long[][] mul(int n, long a1[][], long a2[][]) {
		long temp[][] = new long[n][n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				long sum = 0;
				for (int k = 0; k < n; k++) {
					sum = (sum + a1[i][k] * a2[k][j]) % MOD;
				}
				temp[i][j] = sum;
			}
		}
		return temp;
	}

	void seive(int n) {
		b = new boolean[n + 1];
		prime = new int[n + 1];
		for (int i = 2; i * i <= n; i++) {
			if (!b[i]) {
				for (int j = 2 * i; j <= n; j += i) {
					if (!b[j]) {
						b[j] = true;
						prime[j] = i;
					}
				}
			}
		}
	}

	int binarySearch1(int arr[], int x) {
		int ans = -1;
		int low = 0, high = arr.length - 1;
		while (high >= low) {
			int mid = (low + high) / 2;
			if (arr[mid] >= x) {
				ans = mid;
				high = mid - 1;
			} else
				low = mid + 1;
		}
		return ans;
	}

	int binarySearch2(Integer arr[], int x) {
		int ans = -1;
		int low = 0, high = arr.length - 1;
		while (high >= low) {
			int mid = (low + high) / 2;
			if (arr[mid] >= x) {
				ans = mid;
				low = mid + 1;
			} else
				high = mid - 1;
		}
		return ans + 1;
	}

	int cntEven(String str) {
		int cnt = 0;
		for (int i = str.length() - 1; i >= 0; i--) {
			if ((str.charAt(i) - '0') % 2 == 0) {
				cnt++;
			}
		}
		return cnt;
	}

	int max = 0;

	int getParent(int x) {
		// System.out.println(x+" "+parent[x]);
		if (parent[x] != x) {
			parent[x] = getParent(parent[x]);
		}
		return parent[x];
	}

	class Pair implements Comparable<Pair> {
		int u;
		int v, r, i;

		Pair(int u, int v, int r, int i) {
			this.u = u;
			this.v = v;
			this.r = r;
			this.i = i;
		}

		Pair(int u, int v, int r) {
			this.u = u;
			this.v = v;
			this.r = r;
		}

		Pair(int u, int v) {
			this.u = u;
			this.v = v;
		}

		public int hashCode() {
			return Objects.hash();
		}

		public boolean equals(Object o) {
			Pair other = (Pair) o;
			return ((u == other.u && v == other.v));// || (v == other.u && u ==
			// other.v));
		}

		public int compareTo(Pair other) {
			//return Long.compare(r, other.r);
			 return Long.compare(u, other.u) != 0 ? (Long.compare(u, other.u))
			 : (Long.compare(v, other.v));
			// :(Long.compare(other.r, r))) ;
		}

	}

	int min(int x, int y) {
		if (x < y)
			return x;
		return y;
	}

	int max(int x, int y) {
		if (x > y)
			return x;
		return y;
	}

	void buildGraph(int m) {
		while (m-- > 0) {
			int x = ni() - 1, y = ni() - 1, r = ni();
			amp[x].add(new Pair(y, r));
			amp[y].add(new Pair(x, r));
			prr1[m] = new Pair(x, y, r);
		}
	}

	long modInverse(long a, long mOD2) {
		return power(a, mOD2 - 2, mOD2);
	}

	long power(long x, long y, long m) {
		if (y == 0)
			return 1;
		long p = power(x, y / 2, m) % m;
		p = (p * p) % m;

		return (y % 2 == 0) ? p : (x * p) % m;
	}

	boolean isPrime(int x) {
		for (int i = 2; i * 1L * i <= x; i++)
			if (x % i == 0)
				return false;
		return true;
	}

	public long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	void failFn(String str, int arr[]) {
		int len = 0;
		arr[0] = 0;
		int i = 1;
		while (i < arr.length) {
			if (str.charAt(i) == str.charAt(len)) {
				arr[i++] = ++len;
				continue;
			}
			if (len == 0) {
				arr[i] = len;
				i++;
				continue;
			}
			if (str.charAt(i) != str.charAt(len)) {
				len = arr[len - 1];
			}
		}
	}

	static class ST1 {
		int arr[], st[], size;

		ST1(int a[]) {
			arr = a.clone();
			size = 10 * arr.length;
			st = new int[size];
			build(0, arr.length - 1, 1);
		}

		void build(int ss, int se, int si) {
			if (ss == se) {
				st[si] = arr[ss];
				return;
			}
			int mid = (ss + se) / 2;
			int val = 2 * si;
			build(ss, mid, val);
			build(mid + 1, se, val + 1);
			st[si] = (st[val] + st[val + 1]);
		}

		int get(int ss, int se, int l, int r, int si) {
			if (l > se || r < ss || l > r)
				return Integer.MAX_VALUE;
			if (l <= ss && r >= se)
				return st[si];
			int mid = (ss + se) / 2;
			int val = 2 * si;
			return (get(ss, mid, l, r, val) + get(mid + 1, se, l, r, val + 1));
		}
	}

	static class ST {
		int arr[], lazy[], n;

		ST(int a) {
			n = a;
			arr = new int[10 * n];
			lazy = new int[10 * n];
		}

		void up(int l, int r, int val) {
			update(0, n - 1, 0, l, r, val);
		}

		void update(int l, int r, int c, int x, int y, int val) {
			if (lazy[c] != 0) {
				lazy[2 * c + 1] ^= lazy[c];
				lazy[2 * c + 2] ^= lazy[c];
				if (l == r)
					arr[c] ^= lazy[c];
				lazy[c] = 0;
			}
			if (l > r || x > y || l > y || x > r)
				return;
			if (x <= l && y >= r) {
				if ((r - l + 1) % 2 == 1)
					lazy[c] ^= val;
				return;
			}
			int mid = l + r >> 1;
		update(l, mid, 2 * c + 1, x, y, val);
		update(mid + 1, r, 2 * c + 2, x, y, val);
		arr[c] = (arr[2 * c + 1] + arr[2 * c + 2]);
		}

		int an(int ind) {
			return ans(0, n - 1, 0, ind);
		}

		int ans(int l, int r, int c, int ind) {
			if (lazy[c] != 0) {
				lazy[2 * c + 1] += lazy[c];
				lazy[2 * c + 2] += lazy[c];
				if (l == r)
					arr[c] += lazy[c];
				lazy[c] = 0;
			}
			if (l == r)
				return arr[c];
			int mid = l + r >> 1;
		if (mid >= ind)
			return ans(l, mid, 2 * c + 1, ind);
		return ans(mid + 1, r, 2 * c + 2, ind);
		}
	}
	static long[] array;
	public static class FenwickTree {

		 // 1-indexed array, In this array We save cumulative
		// information to perform efficient range queries and
		// updates

		public FenwickTree(int size) {
			array = new long[size + 1];
		}
		int getSum(int index)
		{
			int sum = 0; // Iniialize result

			// index in BITree[] is 1 more than the index in arr[]
			index = index + 1;

			// Traverse ancestors of BITree[index]
			while (index>0)
			{
				// Add current element of BITree to sum
				sum ^= array[index];

				// Move index to parent node in getSum View
				index -= index & (-index);
			}
			return sum;
		}
		public long rsq(int ind) {
			assert ind > 0;
			long sum = 0;
			ind = ind+1;
			while (ind > 0) {
				sum ^= array[ind];
				// Extracting the portion up to the first significant one of the
				// binary representation of 'ind' and decrementing ind by that
				// number
				ind -= ind & (-ind);
			}
			return sum;
		}

		public long rsq(int a, int b) {
			assert b >= a && a > 0 && b > 0;
			return rsq(b) ^ rsq(a - 1);
		}

		public void update(int ind, long value) {
			assert ind > 0;
			ind = ind+1;
			while (ind < array.length) {
				array[ind] ^= value;
				// Extracting the portion up to the first significant one of the
				// binary representation of 'ind' and incrementing ind by that
				// number
				ind += ind & (-ind);
			}
		}

		public int size() {
			return array.length - 1;
		}
	}

	public static int[] shuffle(int[] a, Random gen) {
		for (int i = 0, n = a.length; i < n; i++) {
			int ind = gen.nextInt(n - i) + i;
			int d = a[i];
			a[i] = a[ind];
			a[ind] = d;
		}
		return a;
	}

	long power(long x, long y, int mod) {
		long ans = 1;
		while (y > 0) {
			if (y % 2 == 0) {
				x = (x * x) % mod;
				y /= 2;
			} else {
				ans = (x * ans) % mod;
				y--;
			}
		}
		return ans;
	}

	void soln() {
		is = System.in;
		out = new PrintWriter(System.out);
		long s = System.currentTimeMillis();
		solve();
		out.close();
		out.flush();
		tr(System.currentTimeMillis() - s + "ms");
	}

	// To Get Input
	// Some Buffer Methods
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = is.read(inbuf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}

	private int skip() {
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	private double nd() {
		return Double.parseDouble(ns());
	}

	private char nc() {
		return (char) skip();
	}

	private String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '
			// ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

	private void tr(Object... o) {
		if (!oj)
			System.out.println(Arrays.deepToString(o));
	}
}

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] points = new int[n][2];
		for(int i=0;i<n;i++){
			points[i][0] = sc.nextInt();
			points[i][1] = sc.nextInt();
		}
		if(n==1)System.out.println(-1);
		else if(n==2){
			if(points[0][0] != points[1][0] && points[0][1] != points[1][1]){
				System.out.println(Math.abs(points[0][0]-points[1][0])*Math.abs(points[0][1]-points[1][1]));
			}
			else{
				System.out.println(-1);
			}
		}
		else{
			for(int i=0;i<n-1;i++){
				boolean flag = false;
				for(int j=i+1;j<n;j++){
					if(points[i][0] != points[j][0] && points[i][1] != points[j][1]){
						System.out.println(Math.abs(points[i][0]-points[j][0])*Math.abs(points[i][1]-points[j][1]));
						flag = true;
						break;
					}
					if(flag)break;
				}
			}
		}
	}
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.Arrays;
 public class Maximum{

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));

        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

        public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }

        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }      //Fastscanner class end

   static FastScanner in=new FastScanner();
   static PrintWriter ww=new PrintWriter(new OutputStreamWriter(System.out));
   public static void main(String args[])throws IOException
   {
   //Main ob=new Main();
   Maximum ob=new Maximum();
   ob.solve();
   ww.close();
   }
   public void solve()throws IOException
   {
    int n=in.nextInt();
    int x1=0,y1=0;
    int sum=0;
    int a[]=new int[n];
    for(int i=0;i<n;i++)
    {
       x1=in.nextInt();
       y1=in.nextInt();
    }
    if(n==1)
       System.out.println("-1");
    else if(n>1)
    {
     for(int i=0;i<n;i++)
     {
        sum=x1*y1;
     }
     System.out.println(sum);
    }
   }
  }

import java.util.*;
import java.lang.*;
import java.io.*;
public class Wilbur_and_Swimming_Pool {

	public static void main(String[] args) throws java.lang.Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine()),x[]=new int[n],y[]=new  int[n];
		for(int i=0; i<n; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine());
			x[i]=Integer.parseInt(st.nextToken());y[i]=Integer.parseInt(st.nextToken());
		}
		if(n==1) System.out.println(-1);
		else {
			int l=0,b=0;
			for(int i=1; i<n; i++) {
				if((x[i]-x[i-1])!=0) {l=(int)Math.abs(x[i]-x[i-1]);break;}
			}
			for(int i=1; i<n; i++) {
				if((y[i]-x[i-1])!=0) {b=(int)Math.abs(y[i]-y[i-1]);break;}
			}
			System.out.println(l==0||b==0?-1:l*b);
		}
	}

}

//package Codeforces.Div2A_331.Code1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/*
 * some cheeky quote
 */

public class Main
{
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException
    {
        int n = in.nextInt();
        if (n <= 1)
        {
            System.out.println(-1);
        } else if (n == 2)
        {
            Point a = new Point(in.nextInt(), in.nextInt());
            Point b = new Point(in.nextInt(), in.nextInt());
            if (a.x != b.x && a.y != b.y)
            {
                System.out.println(Math.abs(a.x - b.x) * Math.abs(a.y - b.y));
            } else
            {
                System.out.println(-1);
            }
        } else if (n == 3)
        {
            Point a[] = new Point[3];
            for (int i = 0; i < a.length; i++)
            {
                int x = in.nextInt();
                int y = in.nextInt();
                a[i] = new Point(x, y);
            }
            Arrays.sort(a);

            Point first = a[0];
            Point mid = a[1];
            Point last = a[2];

            if ((mid.x == last.x && mid.y == first.y) || (mid.x == first.x && mid.y == last.y))
            {
                System.out.println(Math.abs(first.x - last.x) * Math.abs(first.y - last.y));
            } else if (last.x == mid.x && last.y == first.y)
            {
                System.out.println(Math.abs(mid.y - last.y) * Math.abs(first.x - last.x));
            } else if (first.x == mid.x && first.y == last.y)
            {
                System.out.println(Math.abs(first.x - last.x) * Math.abs(first.y - mid.y));
            } else
            {
                System.out.println(-1);
            }
        } else
        {
            Point a[] = new Point[4];
            for (int i = 0; i < a.length; i++)
            {
                int x = in.nextInt();
                int y = in.nextInt();
                a[i] = new Point(x, y);
            }

            Arrays.sort(a);

            if (Math.abs(a[0].x - a[1].x) == Math.abs(a[2].x - a[3].x) && Math.abs(a[0].y - a[2].y) == Math.abs(a[1].y - a[3].y))
            {
                System.out.println(Math.abs(a[0].x - a[1].x) * Math.abs(a[0].y - a[2].y));
            } else
            {
                System.out.println(-1);
            }
        }
    }

    public void run()
    {
        try
        {
            in = new FastScanner();
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e)
        {
            e.printStackTrace();
        }
    }

    class FastScanner
    {
        BufferedReader br;
        StringTokenizer st;

        FastScanner()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreTokens())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

    }

    public static void main(String[] arg)
    {
        new Main().run();
    }
}

class Point implements Comparable<Point>
{
    int x;
    int y;

    Point(int x, int y)
    {
        this.x = x;
        this.y = y;
    }

    public int compareTo(Point that)
    {
        if (this.x == that.x)
        {
            return this.x - that.x;
        }
        return this.y - that.y;
    }
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.lang.*;

public class P596A {
    //static long mod=1000000007;

    public static void main(String[] args) throws Exception{
         InputReader in = new InputReader(System.in);
        PrintWriter pw=new PrintWriter(System.out);

            int n=in.readInt();
        Pair p[]=new Pair[n];
        for(int i=0;i<n;i++)
        {
            int x=in.readInt();
            int y=in.readInt();
            Pair c=new Pair(x,y);
            p[i]=c;
        }
        Arrays.sort(p);
        if(n==1)
        {
            pw.println("-1");
        }
        else if(n==2)
        {
            int d1=abs(p[1].a,p[0].a);
            int d2=abs(p[1].b,p[0].b);
            if(d1!=0&&d2!=0)
            {
                int a=d1*d2;
                pw.println(a);
            }
            else
                pw.println("-1");
        }
        else if(n==3)
        {
            int d1=abs(p[1].a,p[0].a);
            int d2=abs(p[1].b,p[0].b);
            int e1=abs(p[2].a,p[0].a);
            int e2=abs(p[2].b,p[0].b);
            int f1=abs(p[2].a,p[1].a);
            int f2=abs(p[2].b,p[1].b);
            HashSet<Integer>hs=new HashSet<Integer>();
            if(d1!=0)
            hs.add(d1);
            if(d2!=0)
            hs.add(d2);
            if(e1!=0)
            hs.add(e1);
            if(e2!=0)
            hs.add(e2);
            if(f1!=0)
            hs.add(f1);
            if(f2!=0)
            hs.add(f2);
            int a=1;
            if(hs.size()==1)
            {
                for(int x:hs)
                {
                    a=x*x;
                }
            }
            else
            {
                for(int x:hs)
                {
                    a*=x;
                }
            }
            pw.println(a);
        }
        else
        {
            int d1=abs(p[1].a,p[0].a);
            int d2=abs(p[1].b,p[0].b);
            int a=d1*d2;
            pw.println(a);
        }

        pw.close();
    }

    public static long  ways(int n, int r, long MOD)
    {
      //  vector<long long> f(n + 1,1);
        long f[]=new long[n+1];
        Arrays.fill(f,1);
        for (int i=2; i<=n;i++)
            f[i]= (f[i-1]*i) % MOD;
        return (f[n]*((InverseEuler(f[r], MOD) * InverseEuler(f[n-r], MOD)) % MOD)) % MOD;
    }
    public static long  InverseEuler(long n, long MOD)
    {
        return pow(n,MOD-2,MOD);
    }
    static boolean isPrime(int number) {
        if (number <= 1) {
            return false;
        }
        if (number <= 3) {
            return true;
        }
        if (number % 2 == 0 || number % 3 == 0) {
            return false;
        }
        int i = 5;
        while (i * i <= number) {
            if (number % i == 0 || number % (i + 2) == 0) {
                return false;
            }
            i += 6;
        }
        return true;
    }

public static long gcd(long x,long y)
{
    if(x%y==0)
        return y;
    else
        return gcd(y,x%y);
}

public static int gcd(int x,int y)
{
    if(x%y==0)
        return y;
    else
        return gcd(y,x%y);
}
public static int abs(int a,int b)
{
    return (int)Math.abs(a-b);
}
public static long abs(long a,long b)
{
    return (long)Math.abs(a-b);
}
public static int max(int a,int b)
{
    if(a>b)
        return a;
    else
        return b;
}
public static int min(int a,int b)
{
    if(a>b)
        return b;
    else
        return a;
}
public static long max(long a,long b)
{
    if(a>b)
        return a;
    else
        return b;
}
public static long min(long a,long b)
{
    if(a>b)
        return b;
    else
        return a;
}

static boolean isPowerOfTwo (long v) {
    return (v & (v - 1)) == 0;
}
public static long pow(long n,long p,long m)
{
     long  result = 1;
      if(p==0)
        return 1;
    if (p==1)
        return n;
    while(p!=0)
    {
        if(p%2==1)
            result *= n;
        if(result>=m)
        result%=m;
        p >>=1;
        n*=n;
        if(n>=m)
        n%=m;
    }
    return result;
}

static class Pair implements Comparable<Pair>
{
    int a,b;
    Pair (int a,int b)
    {
        this.a=a;
        this.b=b;
    }

    public int compareTo(Pair o) {
        // TODO Auto-generated method stub
        if(this.a!=o.a)
        return Integer.compare(this.a,o.a);
        else
            return Integer.compare(this.b, o.b);
        //return 0;
    }
}

static long sort(int a[],int n)
{   int b[]=new int[n];
    return mergeSort(a,b,0,n-1);}
static long mergeSort(int a[],int b[],long left,long right)
{ long c=0;if(left<right)
 {   long mid=left+(right-left)/2;
     c= mergeSort(a,b,left,mid);
     c+=mergeSort(a,b,mid+1,right);
     c+=merge(a,b,left,mid+1,right); }
    return c;    }
static long merge(int a[],int  b[],long left,long mid,long right)
{long c=0;int i=(int)left;int j=(int)mid; int k=(int)left;
while(i<=(int)mid-1&&j<=(int)right)
{ if(a[i]<=a[j]) {b[k++]=a[i++]; }
else    { b[k++]=a[j++];c+=mid-i;}}
while (i <= (int)mid - 1)   b[k++] = a[i++];
while (j <= (int)right) b[k++] = a[j++];
for (i=(int)left; i <= (int)right; i++)
    a[i] = b[i];  return c;  }

   static  class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

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

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

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

        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public double readDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, readInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return readString();
        }

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

     static class OutputWriter
    {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream)
        {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer)
        {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects)
        {
            for (int i = 0; i < objects.length; i++)
            {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects)
        {
            print(objects);
            writer.println();
        }

        public void close()
        {
            writer.close();
        }

        public void flush()
        {
            writer.flush();
        }

    }
    /* USAGE

    //initialize
        InputReader in      = new InputReader(System.in);
        OutputWriter out    =   new OutputWriter(System.out);

    //read int
    int i = in.readInt();
    //read string
    String s = in.readString();
    //read int array of size N
    int[] x = IOUtils.readIntArray(in,N);
    //printline
    out.printLine("X");

    //flush output
    out.flush();

    //remember to close the
    //outputstream, at the end
    out.close();

    */
  static   class IOUtils {

        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.readInt();
            return array;
    }
    }
//BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    //StringBuilder sb=new StringBuilder("");
     //InputReader in = new InputReader(System.in);
  // OutputWriter out = new OutputWriter(System.out);
    //PrintWriter pw=new PrintWriter(System.out);
    //String line=br.readLine().trim();

    //int t=Integer.parseInt(br.readLine());
  //    while(t-->0)
    //{
    //int n=Integer.parseInt(br.readLine());
    //long n=Long.parseLong(br.readLine());
    //String l[]=br.readLine().split(" ");
  //int m=Integer.parseInt(l[0]);
    //int k=Integer.parseInt(l[1]);
    //String l[]=br.readLine().split(" ");
    //l=br.readLine().split(" ");
    /*int a[]=new int[n];
    for(int i=0;i<n;i++)
    {
        a[i]=Integer.parseInt(l[i]);
    }*/
       //System.out.println(" ");

    //}
}

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;

public class A {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA  {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int x[] = new int[4];
        int y[] = new int[4];
        int n = in.nextInt();

        for (int i = 0; i < n; ++i)
        {
            x[i] = in.nextInt();
            y[i] = in.nextInt();
        }
        if(n<=1){
            out.println(-1);
            return;
        }
        else if(n==2)
        {
            if(x[0]==x[1] && y[0]==y[1]){
                out.println(-1);
                return;
            }
            out.println(Math.abs(x[0]-x[1]) * Math.abs(y[0]-y[1]) );
        }else
        {
            int xx = (x[0]-x[1])!=0 ? Math.abs(x[0]-x[1]) : Math.abs(x[0]-x[2]);
            int yy = (y[0]-y[1])!=0 ? Math.abs(y[0]-y[1]) : Math.abs(y[0]-y[2]);
            out.println(xx*yy);
        }

    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.util.*;

/**
 *
 * @author Zach
 */
public class ACM {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int a;
        Scanner in = new Scanner(System.in);
        a=in.nextInt();
        int[] x = new int[4];
        int[] y = new int[4];
        for(int i=0; i<a; i++){
            x[i]=in.nextInt();
            y[i]=in.nextInt();
        }
        if(a==1){
            System.out.println(-1);
        }
        if(a>2){
            System.out.println(1);
        }
        if(a==2&(x[0]-x[1])*(y[0]-y[1])==0){
            System.out.println(-1);

        }
        if(a==2&(x[0]-x[1])*(y[0]-y[1])!=0){
            System.out.println(1);

        }
    }

}

import java.math.*;
import java.io.*;
import java.util.*;
public class C596A{
   public static long[] cAr, div;
   public static int N,M,K;
   public static int[] numCycle;
   public static Map<Integer,Set<Integer>> map;
   public static long MOD = 1000000007;
   public static void main(String[] args) throws IOException{
      InputReader in=new InputReader(new InputStreamReader(System.in));
      PrintWriter out=new PrintWriter(new BufferedOutputStream(System.out));
      int N=in.nextInt();
      ArrayList<Integer> xC=new ArrayList<Integer>();
      ArrayList<Integer> yC=new ArrayList<Integer>();
      for(int x=0;x<N;x++){
      int[] ar=in.nextIntAr();
      xC.add(ar[0]);
      yC.add(ar[1]);
      }
      if(xC.size()==2 && yC.size()==2){
         int dx=xC.get(1)-xC.get(0);
         int dy=yC.get(1)-yC.get(0);
         System.out.println(Math.abs(dx*dy));
      }
      else System.out.println("-1");
   }

   public static void setUpChoose(int t){
      cAr=new long[t+1];
      div=new long[t+1];
      cAr[0]=1;
      div[0]=1;

      for(int x=1;x<=t;x++){
         cAr[x]=(x*cAr[x-1])%(MOD);
         div[x]=pow(cAr[x],MOD-2);}
   }

   public static long choose(int x,int y){
      long a=cAr[x+y];
      long b=div[x];
      long c=div[y];
      a=(a*b)%MOD;
      a=(a*c)%MOD;
      return a;
   }

   public static long pow(long a,long b){
      if(b==1)
         return a;
      long c=b/2;
      long temp=pow(a,c)%MOD;
      temp=(temp*temp)%MOD;
      if(b%2==1) temp=temp*a;
      return temp%MOD;
   }
}

class InputReader{
   private BufferedReader br;
   public InputReader(InputStreamReader in){
      br=new BufferedReader(in);
   }
   public int nextInt(){
      try{
         return Integer.parseInt(br.readLine());}
      catch(IOException e){throw new InputMismatchException();}
   }
   public int[] nextIntAr(){
      try{
         String[] s=br.readLine().split(" ");
         int[] ret=new int[s.length];
         for(int x=0;x<s.length;x++)
            ret[x]=Integer.parseInt(s[x]);
         return ret;}

      catch(IOException e){throw new InputMismatchException();}
   }

   public long nextLong(){
      try{
         return Long.parseLong(br.readLine());}
      catch(IOException e){throw new InputMismatchException();}
   }
   public long[] nextLongAr(){
      try{
         String[] s=br.readLine().split(" ");
         long[] ret=new long[s.length];
         for(int x=0;x<s.length;x++)
            ret[x]=Long.parseLong(s[x]);
         return ret;}

      catch(IOException e){throw new InputMismatchException();}
   }

   public String[] nextStringAr(){
      try{
         return br.readLine().split(" ");}

      catch(IOException e){throw new InputMismatchException();}
   }

   public String nextString(){
      try{
         return br.readLine();}

      catch(IOException e){throw new InputMismatchException();}
   }
}

class Pair implements Comparable<Pair>{
   long a;
   long b;

   public Pair(long ma, long mb){
      a = ma;
      b = mb;
   }

   public int compareTo(Pair o){
      if(a == o.a){
         if(b==o.b)
            return 0;
         return b<o.b?-1:1;
      }
      return a<o.a?-1:1;
   }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

/**
 * Created by yujiahao on 3/22/16.
 */
public class cf_331_a {
    private FastScanner in;
    private PrintWriter out;

    public void solve() throws IOException {
        int n = in.nextInt();
        if (n==3 || n==4){
            out.print("1");
            return;
        }else if(n==1 || n==0){
            out.print("-1");
            return;
        }

        int[][] p = new int[2][2];

        for (int i=0; i<2; i++){
            p[i][0] = in.nextInt();
            p[i][1] = in.nextInt();
        }

        if (p[0][0]==p[1][0] || p[0][1]==p[1][1]){
            out.print("-1");
            return;
        }

        out.print("1");
    }

    public void run() {
        try {
            in = new FastScanner();
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private class FastScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public BigInteger nextBigInteger() { return new BigInteger(next());}

    }

    public static void main(String[] arg) {
        new cf_331_a().run();
    }
}

import java.util.Scanner;

public class Masked{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int t= scan.nextInt();
		int x[] = new int[t];
		int y[] = new int[t];

		for(int i = 0 ; i < t ; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int p = 0,p1=0;
		int same = 0 ;
		int pointX = x[0];
		int pointY = y[0];
		for(int i = 1 ; i < t ; i++){
			if(pointX == x[i]){
				same++;
				p = i;
			}
		}

		for(int i = 1 ; i < t ;i++){
			if(pointY == y[i]) {
				same++;
				p1 = i;
			}
		}

		if(same == 0){
			if(t <= 1){
				System.out.println(-1);
				return;
			}
			if(t == 2){
				System.out.println(Math.abs(x[1]-x[0])*Math.abs(x[1]-x[0]));
			}
		}else{
			if(p > 0){
				System.out.println(Math.abs(x[0]-x[p])*Math.abs(x[0]-x[p]));
			}else if(p1 > 0){
				System.out.println(Math.abs(y[0]-y[p])*Math.abs(y[0]-y[p]));
			}
		}

	}

}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.lang.RuntimeException;

public class Main {
    public static void main(String[] args) throws IOException{
        InputReader reader = new InputReader();
        int N = reader.nextInt();
        if ( N == 1 ) {
            System.out.println(-1);
        } else if ( N == 2 ) {
            int x1 = reader.nextInt();
            int y1 = reader.nextInt();

            int x2 = reader.nextInt();
            int y2 = reader.nextInt();

            int x3 = x2;
            int y3 = y1;

            int x4 = x1;
            int y4 = y2;

            int height = (int)Math.sqrt( Math.pow(x1 - x3, 2) +
                                    Math.pow(y1 - y3, 2) );
            int width = (int)Math.sqrt( Math.pow(x1 - x4, 2) +
                                    Math.pow(y1 - y4, 2) );
            System.out.println(height * width);

        } else if ( N == 4 ) {
            int x1 = reader.nextInt();
            int y1 = reader.nextInt();

            int x2 = reader.nextInt();
            int y2 = reader.nextInt();

            int x3 = reader.nextInt();
            int y3 = reader.nextInt();

            int x4 = reader.nextInt();
            int y4 = reader.nextInt();

            int length1 = (int)Math.sqrt( Math.pow(x1 - x2, 2) +
                                    Math.pow(y1 - y2, 2) );
            int length2 = (int)Math.sqrt( Math.pow(x2 - x3, 2) +
                                    Math.pow(y2 - y3, 2) );
            int length3 = (int)Math.sqrt( Math.pow(x3 - x4, 2) +
                                    Math.pow(y3 - y4, 2) );
            int length4 = (int)Math.sqrt( Math.pow(x4 - x1, 2) +
                                    Math.pow(y4 - y1, 2) );
            int width = 0;
            int height = 0;
            if ( length1 != length2 ) {
                width = length1;
                height = length2;
            } else {
                if ( length1 != length3 ) {
                    width = length1;
                    height = length3;
                } else {
                    width = length1;
                    height = length4;
                }
            }

            System.out.println(width * height);

        }  else if ( N == 3 ) {
            int x1 = reader.nextInt();
            int y1 = reader.nextInt();

            int x2 = reader.nextInt();
            int y2 = reader.nextInt();

            int x3 = reader.nextInt();
            int y3 = reader.nextInt();

            int height = (int)Math.sqrt( Math.pow(x1 - x2, 2) +
                                    Math.pow(y1 - y2, 2) );
            int width = (int)Math.sqrt( Math.pow(x2 - x3, 2) +
                                    Math.pow(y2 - y3, 2) );
            System.out.println(height * width);

        }
    }
}
class InputReader {
    private StringTokenizer tokenizer;
    private BufferedReader reader;

    public InputReader() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = null;
    }

    public String nextLine() throws IOException{
        return reader.readLine();
    }

    public String next() {
        while ( tokenizer == null || !tokenizer.hasMoreTokens() ) {
            try {
                tokenizer = new StringTokenizer(nextLine());
            } catch(IOException e ) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.lang.*;

public class P596A {
    //static long mod=1000000007;

    public static void main(String[] args) throws Exception{
         InputReader in = new InputReader(System.in);
        PrintWriter pw=new PrintWriter(System.out);

            int n=in.readInt();
        Pair p[]=new Pair[n];
        for(int i=0;i<n;i++)
        {
            int x=in.readInt();
            int y=in.readInt();
            Pair c=new Pair(x,y);
            p[i]=c;
        }
        Arrays.sort(p);
        if(n==1)
        {
            pw.println("-1");
        }
        else if(n==2)
        {
            int d1=p[1].a-p[0].a;
            int d2=p[1].b-p[0].b;
            if(d1!=0&&d2!=0)
            {
                int a=d1*d2;
                pw.println(a);
            }
            else
                pw.println("-1");
        }
        else if(n==3)
        {
            int d1=abs(p[1].a,p[0].a);
            int d2=abs(p[1].b,p[0].b);
            int e1=abs(p[2].a,p[0].a);
            int e2=abs(p[2].b,p[0].b);
            int f1=abs(p[2].a,p[1].a);
            int f2=abs(p[2].b,p[1].b);
            HashSet<Integer>hs=new HashSet<Integer>();
            if(d1!=0)
            hs.add(d1);
            if(d2!=0)
            hs.add(d2);
            if(e1!=0)
            hs.add(e1);
            if(e2!=0)
            hs.add(e2);
            if(f1!=0)
            hs.add(f1);
            if(f2!=0)
            hs.add(f2);
            int a=1;
            if(hs.size()==1)
            {
                for(int x:hs)
                {
                    a=x*x;
                }
            }
            else
            {
                for(int x:hs)
                {
                    a*=x;
                }
            }
            pw.println(a);
        }
        else
        {
            int d1=p[3].a-p[0].a;
            int d2=p[3].b-p[0].b;
            int a=d1*d2;
            pw.println(a);
        }

        pw.close();
    }

    public static long  ways(int n, int r, long MOD)
    {
      //  vector<long long> f(n + 1,1);
        long f[]=new long[n+1];
        Arrays.fill(f,1);
        for (int i=2; i<=n;i++)
            f[i]= (f[i-1]*i) % MOD;
        return (f[n]*((InverseEuler(f[r], MOD) * InverseEuler(f[n-r], MOD)) % MOD)) % MOD;
    }
    public static long  InverseEuler(long n, long MOD)
    {
        return pow(n,MOD-2,MOD);
    }
    static boolean isPrime(int number) {
        if (number <= 1) {
            return false;
        }
        if (number <= 3) {
            return true;
        }
        if (number % 2 == 0 || number % 3 == 0) {
            return false;
        }
        int i = 5;
        while (i * i <= number) {
            if (number % i == 0 || number % (i + 2) == 0) {
                return false;
            }
            i += 6;
        }
        return true;
    }

public static long gcd(long x,long y)
{
    if(x%y==0)
        return y;
    else
        return gcd(y,x%y);
}

public static int gcd(int x,int y)
{
    if(x%y==0)
        return y;
    else
        return gcd(y,x%y);
}
public static int abs(int a,int b)
{
    return (int)Math.abs(a-b);
}
public static long abs(long a,long b)
{
    return (long)Math.abs(a-b);
}
public static int max(int a,int b)
{
    if(a>b)
        return a;
    else
        return b;
}
public static int min(int a,int b)
{
    if(a>b)
        return b;
    else
        return a;
}
public static long max(long a,long b)
{
    if(a>b)
        return a;
    else
        return b;
}
public static long min(long a,long b)
{
    if(a>b)
        return b;
    else
        return a;
}

static boolean isPowerOfTwo (long v) {
    return (v & (v - 1)) == 0;
}
public static long pow(long n,long p,long m)
{
     long  result = 1;
      if(p==0)
        return 1;
    if (p==1)
        return n;
    while(p!=0)
    {
        if(p%2==1)
            result *= n;
        if(result>=m)
        result%=m;
        p >>=1;
        n*=n;
        if(n>=m)
        n%=m;
    }
    return result;
}

static class Pair implements Comparable<Pair>
{
    int a,b;
    Pair (int a,int b)
    {
        this.a=a;
        this.b=b;
    }

    public int compareTo(Pair o) {
        // TODO Auto-generated method stub
        if(this.a!=o.a)
        return Integer.compare(this.a,o.a);
        else
            return Integer.compare(this.b, o.b);
        //return 0;
    }
}

static long sort(int a[],int n)
{   int b[]=new int[n];
    return mergeSort(a,b,0,n-1);}
static long mergeSort(int a[],int b[],long left,long right)
{ long c=0;if(left<right)
 {   long mid=left+(right-left)/2;
     c= mergeSort(a,b,left,mid);
     c+=mergeSort(a,b,mid+1,right);
     c+=merge(a,b,left,mid+1,right); }
    return c;    }
static long merge(int a[],int  b[],long left,long mid,long right)
{long c=0;int i=(int)left;int j=(int)mid; int k=(int)left;
while(i<=(int)mid-1&&j<=(int)right)
{ if(a[i]<=a[j]) {b[k++]=a[i++]; }
else    { b[k++]=a[j++];c+=mid-i;}}
while (i <= (int)mid - 1)   b[k++] = a[i++];
while (j <= (int)right) b[k++] = a[j++];
for (i=(int)left; i <= (int)right; i++)
    a[i] = b[i];  return c;  }

   static  class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

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

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

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

        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public double readDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, readInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return readString();
        }

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

     static class OutputWriter
    {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream)
        {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer)
        {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects)
        {
            for (int i = 0; i < objects.length; i++)
            {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects)
        {
            print(objects);
            writer.println();
        }

        public void close()
        {
            writer.close();
        }

        public void flush()
        {
            writer.flush();
        }

    }
    /* USAGE

    //initialize
        InputReader in      = new InputReader(System.in);
        OutputWriter out    =   new OutputWriter(System.out);

    //read int
    int i = in.readInt();
    //read string
    String s = in.readString();
    //read int array of size N
    int[] x = IOUtils.readIntArray(in,N);
    //printline
    out.printLine("X");

    //flush output
    out.flush();

    //remember to close the
    //outputstream, at the end
    out.close();

    */
  static   class IOUtils {

        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.readInt();
            return array;
    }
    }
//BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    //StringBuilder sb=new StringBuilder("");
     //InputReader in = new InputReader(System.in);
  // OutputWriter out = new OutputWriter(System.out);
    //PrintWriter pw=new PrintWriter(System.out);
    //String line=br.readLine().trim();

    //int t=Integer.parseInt(br.readLine());
  //    while(t-->0)
    //{
    //int n=Integer.parseInt(br.readLine());
    //long n=Long.parseLong(br.readLine());
    //String l[]=br.readLine().split(" ");
  //int m=Integer.parseInt(l[0]);
    //int k=Integer.parseInt(l[1]);
    //String l[]=br.readLine().split(" ");
    //l=br.readLine().split(" ");
    /*int a[]=new int[n];
    for(int i=0;i<n;i++)
    {
        a[i]=Integer.parseInt(l[i]);
    }*/
       //System.out.println(" ");

    //}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

public class Gots {

    public static long mod = 1000000000 + 7;

    public static long gcd(long a, long b) {
        return (b == 0) ? a : gcd(b, a % b);
    }
    public static int counter = 0;

    public static boolean isValid(int i, int j, int N, int M) {
        return (i >= 0 && i < N && j >= 0 && j < M);
    }

    public static long f(char[] arr) {
        long ans = 0;
        return ans;
    }

    public static void main(String[] args) throws IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter writer = new PrintWriter(System.out);
        String[] input = reader.readLine().split(" ");
        List<Pair> list = new ArrayList();
        int N = Integer.parseInt(input[0]);
        for (int i = 0; i < N; i++) {
            input = reader.readLine().split(" ");
            int x, y;
            x = Integer.parseInt(input[0]);
            y = Integer.parseInt(input[1]);
            list.add(new Pair(x, y));
        }
        if (N == 1) {
            writer.println(-1);
        } else {

            Pair opposite = null;
            Pair zero = list.get(0);
            for (int i = 1; i < N; i++) {
                Pair got = list.get(i);
                if (got.first != zero.first && got.second != zero.second) {
                    opposite = got;
                    break;
                }
            }
            if (opposite == null) {
                writer.println(-1);
            } else {
                int area = Math.abs(opposite.first - zero.first) * Math.abs(opposite.second - zero.second);
                writer.println(area);
            }

        }

        //writer.println(new String(res));
        writer.flush();

    }

    static class Pair implements Comparable<Pair> {

        int first;
        int second;

        Pair(int f, int s) {
            first = f;
            second = s;
        }

        @Override
        public int compareTo(Pair o) {
            return Integer.compare(this.first, o.first);
        }

    }
}

import java.util.*;

public class WilburSwimmingPool{
    public static void main(String args[]){
        Scanner sc= new Scanner(System.in);
        int n = sc.nextInt();
        int[][] arr = new int[n][2];
        if(n==1) System.out.println("-1");
        for(int i=0;i<n;i++) {
            arr[i][0] = sc.nextInt();
            arr[i][1] = sc.nextInt();
        }
        if(n==2) {
            if(arr[0][0] == arr[1][0] || arr[0][1] == arr[1][1]) System.out.println(-1);
            else System.out.println((int)Math.abs((arr[0][0]-arr[1][0])*(arr[0][1]-arr[1][1])));
        }
        else{
            int x = 0,y=0;
            for(int i=1;i<n;i++){
                x=Math.max(x,(int)Math.abs(arr[i][0]-arr[i-1][0]));
                y=Math.max(y,(int)Math.abs(arr[i][1]-arr[i-1][1]));
            }
            System.out.println((int)Math.abs(x*y));
        }
    }
}

import java.util.Scanner;

public class Masked{

	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		int t= scan.nextInt();
		int x[] = new int[t];
		int y[] = new int[t];

		for(int i = 0 ; i < t ; i++){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int p = 0,p1=0;
		int same = 0 ;
		int pointX = x[0];
		int pointY = y[0];
		for(int i = 1 ; i < t ; i++){
			if(pointX == x[i]){
				same++;
				p = i;
			}
		}

		for(int i = 1 ; i < t ;i++){
			if(pointY == y[i]) {
				same++;
				p1 = i;
			}
		}

		if(same == 0){
			if(t <= 1){
				System.out.println(-1);
				return;
			}
			if(t == 2){
				System.out.println(Math.abs(x[1]-x[0])*Math.abs(y[1]-y[0]));
			}

		}else{
			p = 0;
			p1 = 0;
			int jk= 0;
			same = 0;
			for(int j = 0 ; j< t ; j++){
				pointX = x[j];
				pointY = y[j];
				//System.out.println("pointX: "+pointX);
				//System.out.println("pointY: "+pointY);
				for(int i = 0 ; i<t; i++){
					if(pointX == x[i] && i != j){
						same++;
						p = i;
						//System.out.println("p:"+p);
					}
				}

				for(int i = 0 ; i < t;i++){
					if(pointY == y[i] && i!=j) {
						same++;
						p1 = i;
						//System.out.println("p1:"+p1);
					}
				}
				if(same == 2){
					jk = j;
					break;
				}
			}

			if(same >= 2){
				//System.out.println("p: "+p+" p1: "+p1);
				//System.out.println("x[jk]: "+x[jk]+" x[p1]: "+x[p1]);
				//System.out.println("y[jk]: "+y[jk]+" y[p]: "+y[p]);
				System.out.println(Math.abs(x[jk]-x[p1])*Math.abs(y[jk]-y[p]));
			}else{
				System.out.println(-1);
			}

		}

	}

}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by peacefrog on 11/15/15.
 * Time : 10:33 PM
 */

public class Task_A {
	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	PrintWriter out;
	long timeBegin, timeEnd;

	public void runIO() throws IOException {
		timeBegin = System.currentTimeMillis();

		InputStream inputStream;
		OutputStream outputStream;

		if (ONLINE_JUDGE) {
			inputStream = System.in;
			Reader.init(inputStream);
			outputStream = System.out;

			out = new PrintWriter(outputStream);

		} else {
			inputStream = new FileInputStream("/home/peacefrog/Dropbox/IdeaProjects/Problem Solving/input");
			Reader.init(inputStream);
			out = new PrintWriter("output.txt");
		}

		solve();

		out.flush();
		out.close();
		timeEnd = System.currentTimeMillis();

		System.err.println("Time = " + (timeEnd - timeBegin));

	}

	/*
	 * Start Solution Here
	 */

	private void solve() throws IOException {
		int n = Reader.nextInt(); //This Variable default in Code Templete
		int[]x = new int[4];
		int y [] = new int[4];

		if(n==1) {
			x[0] = Reader.nextInt();
			y[0] = Reader.nextInt();
			System.out.println(-1);
			return;
		}
		if(n==2)
		{
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				y[i] = Reader.nextInt();
			}
			if(x[0]==x[1] || y[0]==y[1])
			{
				System.out.println(-1);
				return;
			}
			x[2] = x[1];
			y[2] = y[0];

			int len1 = (int) Math.sqrt(Math.pow(x[0]-x[2] , 2) + Math.pow(y[0]-y[2] , 2));
			int len2 = (int) Math.sqrt(Math.pow(x[1]-x[2] , 2) + Math.pow(y[1]-y[2] , 2));
			System.out.println(len1 * len2);
			return;
		}
		if (n==3 )
		{
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				y[i] = Reader.nextInt();
			}
			int len1 = (int) Math.sqrt(Math.pow(x[0]-x[2] , 2) + Math.pow(y[0]-y[2] , 2));
			int len2 = (int) Math.sqrt(Math.pow(x[1]-x[2] , 2) + Math.pow(y[1]-y[2] , 2));
			int len3 = (int) Math.sqrt(Math.pow(x[1]-x[0] , 2) + Math.pow(y[1]-y[0] , 2));

			int sum = len1+len2+len3 ;
			sum/=2 ;

			int area = (int) Math.sqrt(sum * (sum-len1) *(sum-len2) * (sum-len3));
			System.out.println(area*2);
			return;
		}
		if(n ==4 )
		{
			int sumy = 0, sumx = 0;
			for (int i = 0; i < n; i++) {
				x[i] = Reader.nextInt();
				sumx+= x[i];
				y[i] = Reader.nextInt();
				sumy += y[i];
			}

			sumx+= x[0];
			sumy += y[0];
			int dif = sumx - sumy ;
			System.out.println(dif/2);
		}

	}

	public static void main(String[] args) throws IOException {

		new Task_A().runIO();
	}

	static class Reader {
		static BufferedReader reader;
		static StringTokenizer tokenizer;

		/**
		 * call this method to initialize reader for InputStream
		 */
		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer("");
		}

		/**
		 * get next word
		 */
		static String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		static String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return "";
		}

		static int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		static long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		static double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
	}

}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.lang.RuntimeException;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) throws IOException{
        InputReader reader = new InputReader();
        int N = reader.nextInt();
        if ( N == 1 ) {
            int x1 = reader.nextInt();
            int y1 = reader.nextInt();
            System.out.println(-1);
        } else {
            System.out.println(getSquare(N, reader));
        }
    }

    public static int getSquare(int N, InputReader reader) {
        int x1 = reader.nextInt();
        int y1 = reader.nextInt();

        for ( int i = 0; i < N - 1; i++ ) {
            int x2 = reader.nextInt();
            int y2 = reader.nextInt();
            if ( x2 != x1 && y2 != y1 ) {
                return Math.abs(x1 - x2) * Math.abs(y1 - y2);
            }
        }
        return -1;
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader() {
        tokenizer = null;
        reader = new BufferedReader(new InputStreamReader(System.in));
    }

    public String nextLine() throws IOException{
        return reader.readLine();
    }

    public String next() {
        while ( tokenizer == null || !tokenizer.hasMoreTokens() ) {
            try {
                tokenizer = new StringTokenizer(nextLine());
            } catch( IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}

//package CodeForces.Round331;

import java.util.Scanner;
import java.util.TreeMap;

/**
 * Created by ilya on 15.11.15.
 */
public class A596 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        switch (n){
            case 1:
                System.out.println(-1);
                break;
            case 2:
                int aX = sc.nextInt();
                int aY = sc.nextInt();
                int bX = sc.nextInt();
                int bY = sc.nextInt();
                if(aX == bX || aY == bY){
                    System.out.println(-1);
                    break;
                }
                System.out.println(getS(aX,aY,bX,bY));
                break;
            case 3:
            case 4:
                TreeMap<Integer, Integer> points = new TreeMap<>();
                for (int i = 0; i < n; i++) {
                    int a1 = sc.nextInt();
                    int b1 = sc.nextInt();
                    //points.put(a1,b1);
                    if(!points.containsKey(a1))points.put(a1,b1);
                    else if(points.containsKey(a1) && points.lastEntry().getValue()!= b1 && points.firstEntry().getValue()!= b1) points.put(a1,b1);
                }
                System.out.println(getS(points.firstEntry().getKey(), points.firstEntry().getValue(), points.lastEntry().getKey(),points.lastEntry().getValue()));
                break;
        }

    }

    public static int getS(int aX, int aY, int bX, int bY){
            return Math.abs(Math.abs(Math.max(aX, bX)) - Math.min(aX, bX))*Math.abs(Math.abs(Math.max(aY, bY)) - Math.min(aY, bY));
    }
}

import java.util.Scanner;

public class Wilbur {

	public static void main(String[] args) {

		// String n;//,m,oW=0,l=0;

		Scanner in = new Scanner(System.in);
		String ns = in.nextLine();
		int n = Integer.parseInt(ns);
		int[][] rect = new int[n][2];
		int l = 0, b = 0;
		boolean f = true;
			for (int i = 0; i < n; i++) {
				String line = in.nextLine();
				String lineA[] = line.split(" ");
				rect[i][0] = Integer.parseInt(lineA[0]);
				rect[i][1] = Integer.parseInt(lineA[1]);

				rect[i][0] = rect[i][0] - rect[0][0];
				rect[i][1] = rect[i][1] - rect[0][1];

					if(rect[i][0] != 0 && i != 0)
						l = rect[i][0];
					if(rect[i][1] != 0 && i != 0)
						b = rect[i][1];

					if(l != 0 && b != 0)
					{
						long area = l*b;
						area = (area < 0) ? -area : area;
						System.out.println(area);
						f = false;
						break;
					} else if(i == n-1)
					{
						System.out.println(-1);
						f = false;
					}
			}
		//} else
			if(f)
			System.out.println(-1);

		in.close();

	}

}

import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String[] args)  {
        Scanner sc = new Scanner(System.in);
        int n=0,width=0,height=0;
        n = sc.nextInt();
        ArrayList<Integer> hIndices = new ArrayList<Integer>();
        ArrayList<Integer> vIndices = new ArrayList<Integer>();
        for (int i = 0 ; i < n*2 ; i ++)
        {
            if(i%2 == 0)
                hIndices.add(sc.nextInt());
            else
                vIndices.add(sc.nextInt());
        }
        for (int i = 0 ; i < n -1 ; i ++)
        {
            if(hIndices.get(i) != hIndices.get(i+1))
                width  = hIndices.get(i) - hIndices.get(i+1);
            if(vIndices.get(i) != vIndices.get(i+1))
                height = vIndices.get(i) - vIndices.get(i+1);
        }
        int area = width * height;
        if(area == 0 || n <2)
            System.out.print(-1);
        else
            System.out.print(Math.abs(area));
		return ;
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int x = 0;
int y = 0;
int []a= new int[n];
int []b = new int[n];

for(int i = 0;i<n;i++){
a[i]=input.nextInt();
b[i]=input.nextInt();
for(int j = 0;j<i;j++){
    if(Math.abs(a[i]-a[j])>x)x=Math.abs(a[i]-a[j]);
}
for(int j = 0;j<i;j++){
    if(Math.abs(b[i]-b[j])>y)y=Math.abs(a[i]-a[j]);
}
}
long aa = x*y;
if(aa==0){
    System.out.println(-1);
}else System.out.println(aa);
    }

}

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] points = new int[n][2];
		for(int i=0;i<n;i++){
			points[i][0] = sc.nextInt();
			points[i][1] = sc.nextInt();
		}
		if(n==1)System.out.println(-1);
		else if(n==2){
			if(points[0][0] != points[1][0] && points[0][1] != points[1][1]){
				System.out.println(Math.abs(points[0][0]-points[1][0])*Math.abs(points[0][1]-points[1][1]));
			}
			else{
				System.out.println(-1);
			}
		}
		else{
			for(int i=0;i<n-1;i++){
				for(int j=i+1;j<n;j++){
					if(points[i][0] != points[j][0] && points[i][1] != points[j][1]){
						System.out.println(Math.abs(points[i][0]-points[j][0])*Math.abs(points[i][1]-points[j][1]));
						break;
					}
				}
			}
		}
	}
}

//

import java.util.Scanner;

public class ProblemWilbur
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);

        int area;
        int lado1=0;
        int lado2=0;
        int numero = sc.nextInt();

        int[] coordenadasX = new int[numero];
        int[] coordenadasY = new int[numero];

        for(int i=0; i<=numero-1; i++)
        {
        	coordenadasX[i] = sc.nextInt();
        	coordenadasY[i] = sc.nextInt();
        }

        if(numero == 1)
        {
            System.out.println("-1");
        }
        if(numero!=1)
        {
        	if(numero==2)
        	{
        		if(coordenadasX[0]==coordenadasX[1] || coordenadasY[0]==coordenadasY[1])System.out.println("-1");
        		else
        		{
        			area = Math.abs((coordenadasX[0]-coordenadasX[1])*(coordenadasY[0]-coordenadasY[1]));
                                System.out.println(area);
        		}
        	}
        	if(numero==3)
        	{
        		if(coordenadasX[0]!=coordenadasX[1])
        		{
        			lado1= coordenadasX[1]-coordenadasX[0];
        			lado2= coordenadasY[2]-coordenadasY[0];
        		}
        		else
        		{
        			lado2 = coordenadasY[1]-coordenadasY[0];
        			lado1 = coordenadasX[2]-coordenadasX[1];
        		}
        		area = Math.abs(lado1*lado2);
                System.out.println(area);
        	}
            if(numero==4)
            {
                if(coordenadasX[0]!=coordenadasX[1])
                {
                    lado1= Math.abs(coordenadasX[1])-Math.abs(coordenadasX[0]);
                    if(coordenadasY[2]!=coordenadasY[0])
                    lado2= Math.abs(coordenadasY[2])-Math.abs(coordenadasY[0]);
                    else lado2= Math.abs(coordenadasY[2])-Math.abs(coordenadasY[1]);
                }
                else
                {
                    lado2 = Math.abs(coordenadasY[1])-Math.abs(coordenadasY[0]);
                    if(coordenadasY[2]!=coordenadasY[0])
                    lado2= Math.abs(coordenadasY[2])-Math.abs(coordenadasY[0]);
                    else lado2= Math.abs(coordenadasY[2])-Math.abs(coordenadasY[1]);

                }
                area = Math.abs(lado1*lado2);
                System.out.println(area);
            }
        }

    }

}

import javafx.util.Pair;
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static long gcd(long x, long y) {
        long t;
        while (x != 0) {
            t = y % x;
            y = x;
            x = t;
        }
        return y;
    }
    public static void main(String[] args) {
        try{
            //Scanner in = new Scanner(new File("input.txt"));
            //PrintWriter out = new PrintWriter(new FileWriter("output.txt"));
            Scanner in = new Scanner(System.in);
            //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

            int x = 0;
            x = in.nextInt();
            Integer a , b;
            HashSet < Integer > X = new HashSet<>();
            HashSet < Integer > Y = new HashSet<>();
            for(int i = 0;i < x;i++){
                a = in.nextInt();
                b = in.nextInt();
                X.add(a);
                Y.add(b);
            }
            if(X.size()==2 && Y.size()==2){
                System.out.println(1);
            }
            else
                System.out.println(-1);
            //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            //out.close();
        }catch(Exception e){System.out.println("Error!!!");}
    }
    public static class graph{
        ArrayList < ArrayList < Integer > > g;
        ArrayList < ArrayList < Integer > > revg;
        ArrayList < Pair < Integer , Integer > > e;
        Integer []colored;
        boolean []u;
        int V;
        graph(int n){
            g = new ArrayList <>();
            revg = new ArrayList<>();
            colored = new Integer[n];
            u = new boolean[n];
            e = new ArrayList<>();
            V = n;
            for(int i=0;i<n;i++){
                g.add(new ArrayList < Integer >());
                revg.add(new ArrayList < Integer >());
            }
        }
        void addEdge(Integer v,Integer w){
            //System.out.println(e.size());
            e.add(new Pair(v,w));
            g.get(v).add(w);
            revg.get(w).add(v);
        }
        Integer countEdge(){
            return e.size();
        }
        void TopDFS(int v,ArrayList < Integer > T){
            u[v] = true;
            for(int i=0;i < g.get(v).size();i++){
                if(!u[g.get(v).get(i)])
                    TopDFS(g.get(v).get(i) ,T);
            }
            T.add(v);
        }
        void colorDFS(Integer color,Integer v) {
            u[v]=true;
            colored[v] = color;
            for(int i=0;i<revg.get(v).size();i++){
                if(!u[revg.get(v).get(i)])
                    colorDFS(color,revg.get(v).get(i));
            }
        }
        HashSet< Pair < Integer , Integer> > topSort(){
            ArrayList < Integer > Top = new ArrayList<>();
            for(int i = 0;i < V;i++){
                u[i]=false;
            }
            for(int i = 0;i < V;i++){
                if(!u[i])
                    TopDFS(i ,Top);
            }
            for(int i = 0;i < V;i++){
                u[i] = false;
                colored[i] = 0;
            }
            Integer color = 0;
            HashSet < Pair < Integer, Integer > > ans = new HashSet< Pair < Integer, Integer > >();
            for(int i=Top.size() - 1;i >= 0;i--){
                //System.out.println(Top.get(i));
                if(!u[Top.get(i)]) {
                    colorDFS(color, Top.get(i));
                    color++;
                }
            }
            //for(int i=0;i<V;i++)
            //  System.out.println(colored[i]);
            //System.out.println(ans.size());
            for(int i=0;i<e.size();i++){
                if (!colored[e.get(i).getKey()].equals(colored[e.get(i).getValue()])){
                    ans.add(new Pair < Integer , Integer >(colored[e.get(i).getKey()],colored[e.get(i).getValue()]));
                }
            }
            return ans;
        }
    }
}

//package CF;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class B {
    static class Point implements Comparable<Point>{
	int x, y;

	Point(int a, int b) { x = a; y = b; }

	public int compareTo(Point p)
	{
	    if(Math.abs(x - p.x) > 0) return x > p.x ? 1 : -1;
	    if(Math.abs(y - p.y) > 0) return y > p.y ? 1 : -1;
	    return 0;
	}
    }

    public static void main(String[] args) throws IOException
    {
	Scanner bf = new Scanner(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = bf.nextInt();
	if(n == 1)
	    out.println(-1);
	else{
	    Point [] p = new Point[n];
	    for (int i = 0; i < n; i++)
	    {
		p[i] = new Point(bf.nextInt(), bf.nextInt());
	    }
	    Arrays.sort(p);
	    if(n == 2 && (p[0].x == p[1].x || p[0].y == p[1].y))
		out.println(-1);
	    else{
		if(p[n-1].y == p[0].y)
		    p[n-1].y = p[1].y;
		out.println((p[n-1].x-p[0].x)*(p[n-1].y-p[0].y));
	    }
	}
	out.flush();
	out.close();
    }
    static class Scanner{
	BufferedReader bf;
	StringTokenizer st;
	public Scanner(FileReader f){
	    bf = new BufferedReader(f);
	}
	public Scanner(InputStream f){
	    bf = new BufferedReader(new InputStreamReader(f));
	}

	public String next() throws IOException{
	    while(st == null || !st.hasMoreTokens())
		st = new StringTokenizer(bf.readLine());
	    return st.nextToken();
	}
	public int nextInt() throws NumberFormatException, IOException{
	    return Integer.parseInt(next());
	}
    }
}

import java.awt.Point;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

/**
 * Nov 15, 2015 | 5:40:44 PM
 *

 * Description
 *
 *

 *
 * @author Essiennta Emmanuel (colourfulemmanuel@gmail.com)
 */
public class ProblemA{
    int solve(Point[] points){
        Arrays.sort(points, new Comparator<Point>() {

            @Override
            public int compare(Point o1, Point o2){
                int cmp = o1.x - o2.x;
                return cmp == 0 ? o1.y - o2.y : cmp;
            }
        });
        int area = Math.abs((points[points.length - 1].y - points[0].y) * (points[points.length - 1].x - points[0].x));
        return area == 0 ? -1 : area;
    }

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Point[] points = new Point[sc.nextInt()];
        for (int i = 0; i < points.length; i++)
            points[i] = new Point(sc.nextInt(), sc.nextInt());
        System.out.println(new ProblemA().solve(points));
        sc.close();
    }
}

import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);

        int n = in.nextInt();
        int[][] points = new int[n][2];
        for (int i = 0; i < n; i++) {
            points[i] = new int[] {in.nextInt(),in.nextInt()};
        }
        Arrays.sort(points,(x,y)-> x[0] - y[0] == 0 ? x[1] - y[1] : x[0] - y[0]);
        if (n == 1) {
            out.println(-1);
        }
        else if(n == 2) {
            if(points[0][0] == points[1][0] || points[0][1] == points[1][1]) {
                out.println(-1);
            }
            else {
                int x = Math.abs(points[1][0] - points[0][0]);
                int y = Math.abs(points[1][1] - points[0][1]);
                out.println(x*y);
            }
        }
        else if(n == 3){
            int x;
            int y;
            if(points[0][1]!=points[2][1]) {
                if(points[0][0] == points[1][0]) {
                    x = Math.abs(points[1][1] - points[0][1]);
                    y = Math.abs(points[2][0] - points[1][0]);
                }
                else {
                    x = Math.abs(points[2][0] - points[1][0]);
                    y = Math.abs(points[1][1] - points[0][1]);
                }
            }
            else {
                if(points[0][0] == points[1][0]) {
                    x = Math.abs(points[1][1] - points[0][1]);
                    y = Math.abs(points[2][0] - points[0][0]);
                }
                else {
                    x = Math.abs(points[2][0] - points[0][0]);
                    y = Math.abs(points[2][1] - points[1][1]);
                }
            }
            out.println(x*y);
        }
        else {
            int x = Math.abs(points[3][0] - points[0][0]);
            int y = Math.abs(points[3][1] - points[0][1]);
            out.println(x*y);
        }

        out.flush();
    }

}
class Point {
    int x;
    int y;
    public int getX() {
        return x;
    }
    public int getY() {
        return y;
    }
    public Point(int x,int y) {
        this.x = x;
        this.y = y;
    }
}
class InputReader extends BufferedReader {
    StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    }

    public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
        return tokenizer.nextToken();
    }
    public Integer nextInt() {return Integer.valueOf(next());}
    public Long nextLong() {return  Long.valueOf(next());}
    public Double nextDouble() {return Double.valueOf(next());}

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    }
}

import java.util.*;
import java.math.*;
import java.io.*;
import java.text.DecimalFormat;
public class Main{

    static int mod=1000000007 ;
    public static void main(String[] args)  throws IOException {
        s.init(System.in);
        PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int n=s.ni();
        int[] x=new int[n];
        int[] y=new int[n];
        for(int i=0;i<n;i++){
            x[i]=s.ni();
            y[i]=s.ni();
        }
        if(n==1)
            out.println(-1);
        else if(n==2){
            if((x[0]==x[1])||(y[0]==y[1]))
                out.println(-1);
            else {
                double z=(Math.pow(x[0]-x[1],2)+Math.pow(y[0]-y[1],2));
                z/=2;
                if(z-(long)z==0)
                    out.println((long)(z*z));
                else
                    out.println(-1);

            }
        }
        else if(n==3||n==4){
            long area=1;
            if(x[0]==x[1])
                area*=Math.abs(y[1]-y[0]);
            else if(x[0]==x[2])
                area*=Math.abs(y[2]-y[0]);
            else
                area=Math.abs(y[2]-y[1])*1L;
            if(y[0]==y[1])
                area*=Math.abs(x[1]-x[0]);
            else if(y[0]==y[2])
                area*=Math.abs(x[2]-x[0]);
            else
                area*=Math.abs(x[2]-x[1]);
            out.println(area);

        }

        out.close();
    }

        public static class s {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /** call this method to initialize reader for InputStream */
        static void init(InputStream input) {
            reader = new BufferedReader(
                        new InputStreamReader(input) );
            tokenizer = new StringTokenizer("");
        }

        /** get next word */
        static String ns() throws IOException {
            while ( ! tokenizer.hasMoreTokens() ) {
                //TODO add check for eof if necessary
                tokenizer = new StringTokenizer(
                    reader.readLine() );
            }
            return tokenizer.nextToken();
        }

        static int ni() throws IOException {
            return Integer.parseInt( ns() );
        }

        static double nd() throws IOException {
            return Double.parseDouble( ns() );
        }
        static long nl() throws IOException {
            return Long.parseLong( ns() );
        }

    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

/**
 * Created by yujiahao on 3/22/16.
 */
public class cf_331_a {
    private FastScanner in;
    private PrintWriter out;

    public void solve() throws IOException {
        int n = in.nextInt();
        if (n==3 || n==4){
            out.print("1");
            return;
        }else if(n==1 || n==0){
            out.print("-1");
            return;
        }

        int[][] p = new int[2][2];

        for (int i=0; i<2; i++){
            p[i][0] = in.nextInt();
            p[i][1] = in.nextInt();
        }

        if (p[0][0]==p[1][0] || p[0][1]==p[1][1]){
            out.print("-1");
            return;
        }

        out.print("1");
    }

    public void run() {
        try {
            in = new FastScanner();
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private class FastScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public BigInteger nextBigInteger() { return new BigInteger(next());}

    }

    public static void main(String[] arg) {
        new cf_331_a().run();
    }
}

import java.io.*;
import java.util.*;

public class A{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] pos = new int[n][2];
        for(int i = 0;i < n;i++){
            pos[i][0] = in.nextInt();
            pos[i][1] = in.nextInt();
        }
        if(n == 3 || n == 4){
            int dx = 0;
            int dy = 0;
            for(int i = 0;i < n;i++){
                for(int j = 0;j < n;j++){
                    dx = Math.max(dx, Math.abs(pos[i][0] - pos[j][0]));
                    dy = Math.max(dy, Math.abs(pos[i][1] - pos[j][1]));
                }
            }
            System.out.println(dx + " " + dy);
            System.out.println(dx*dy);
        }
        else if(n == 2){
            if(pos[0][0] != pos[1][0] && pos[0][1] != pos[1][1]){
                System.out.println(Math.abs(pos[0][0] - pos[1][0])*Math.abs(pos[0][1]-pos[1][1]));
            }
            else{
                System.out.println(-1);
            }
        }
        else{
            System.out.println(-1);
        }
    }
}

import java.io.*;
import java.util.*;

public class A{
    public static void main(String args[]) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int x[] = new int[n];
        int y[] = new int[n];

        for(int i = 0 ; i < n ; i++){
            String tmp[] = br.readLine().split(" ");
            x[i] = Integer.parseInt(tmp[0]);
            y[i] = Integer.parseInt(tmp[1]);
        }

        if(n < 2) System.out.println(-1);
        else if(n == 2){
            if(x[0] != x[1] && y[0] != y[1]){
                System.out.println(Math.abs(x[0] - x[1]) * Math.abs(y[0] - y[1]));
            }
            else{
                System.out.println(-1);
            }
        }
        else if(n >= 3){
            for(int i = 0 ; i < n ; i++){
                for(int j = i + 1 ; j < n ; j++){
                    if(x[i] != x[j] && y[i] != y[j]){
                        System.out.println(Math.abs(x[i] - x[j]) * Math.abs(y[i] - y[j]));
                        break;
                    }
                }
            }
        }

    }
}

import java.util.Scanner;
/**
 * Created by Dmitry on 15.11.2015.
 */
public class main_1 {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        int n = reader.nextInt();
        int otv=-1;
        if(n>=3){
           otv=1;
        }
        if(n==2) {
            int k1=reader.nextInt();
            int k2=reader.nextInt();
            int k3=reader.nextInt();
            int k4=reader.nextInt();
            if((k1==k3)||(k2==k4)){
                otv=-1;
            }else{
                otv=1;
            }
        }
        System.out.println(otv);
    }
}

//

import java.util.Scanner;

public class ProblemWilbur
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);

        int area;
        int lado1;
        int lado2;
        int numero = sc.nextInt();

        int[] coordenadasX = new int[numero];
        int[] coordenadasY = new int[numero];

        for(int i=0; i<=numero-1; i++)
        {
        	coordenadasX[i] = sc.nextInt();
        	coordenadasY[i] = sc.nextInt();
        }

        if(numero == 1)
        {
            System.out.println("-1");
        }
        if(numero!=1)
        {
        	if(numero==2)
        	{
        		if(coordenadasX[0]==coordenadasX[1] || coordenadasY[0]==coordenadasY[1])System.out.println("-1");
        		else
        		{
        			area = Math.abs((coordenadasX[0]-coordenadasX[1])*(coordenadasY[0]-coordenadasY[1]));
                                System.out.println(area);
        		}
        	}
        	if(numero==3 || numero==4)
        	{
        		if(coordenadasX[0]!=coordenadasX[1])
        		{
        			lado1= coordenadasX[1]-coordenadasX[0];
        			lado2= coordenadasY[2]-coordenadasY[0];
        		}
        		else
        		{
        			lado2 = coordenadasY[1]-coordenadasY[0];
        			lado1 = coordenadasX[2]-coordenadasX[1];
        		}
        		area = Math.abs(lado1*lado2);
                        System.out.println(area);
        	}
        }

    }

}

import java.util.*;

public class WilburSwimmingPool{
    public static void main(String args[]){
        Scanner sc= new Scanner(System.in);
        int n = sc.nextInt();
        int[][] arr = new int[n][2];
        if(n==1) System.out.println("-1");
        for(int i=0;i<n;i++) {
            arr[i][0] = sc.nextInt();
            arr[i][1] = sc.nextInt();
        }
        if(n==2) {
            if(arr[0][0] == arr[1][0] || arr[0][1] == arr[1][1]) System.out.println(-1);
            else System.out.println((int)Math.abs((arr[0][0]-arr[1][0])*(arr[0][1]-arr[1][1])));
        }
        else{
            int x = 0,y=0;
            for(int i=1;i<n;i++){
                x=Math.max(x,(int)Math.abs(arr[i][0]-arr[i-1][0]));
                y=Math.max(y,(int)Math.abs(arr[i][1]-arr[i-1][1]));
            }
            System.out.println((int)Math.abs(x*y));
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

import java.util.StringTokenizer;

public class ASwimmingPool {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        PrintWriter out = new PrintWriter(System.out, true);

        int n_vert=0;

        try {
           n_vert = Integer.parseInt(br.readLine());
        }
        catch (IOException e) {
            System.err.println(e);

        }

        int[][] verts = new int[n_vert][2];

        for (int i=0; i <n_vert; i++) {

            try {
                StringTokenizer st;
                st = new StringTokenizer(br.readLine());
                verts[i][0] = Integer.parseInt(st.nextToken());
            }
            catch (IOException e) {
                System.err.println(e);
            }

        }

        if (n_vert <= 1) {
            System.out.println("-1");
        }

        else if (n_vert == 2) {
            if (verts[0][0] != verts[1][0] && verts[0][1] != verts[1][1]) {
                System.out.println(Math.abs(verts[0][0] - verts[1][0]) * Math.abs(verts[0][1] - verts[1][1]));
            }
            else {
                System.out.println("-1");
            }

        }

        System.out.println(n_vert);
    }
}

import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        TaskA solver = new TaskA();
        solver.solve(in, out);

        out.close();
    }
}

class TaskA {
    final long MOD = (long) 1e9 + 7;
    final int MAXN = 5000001;

    public void solve(InputReader in, PrintWriter out) throws IOException {
        int n = in.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];

        for (int i = 0; i < n; i++) {
            x[i] = in.nextInt();
            y[i] = in.nextInt();
        }
        int ans = -1;
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                if (x[i] != x[j]) {
                    out.println(Math.abs(x[i] - x[j]) * Math.abs(y[i] - y[j]));
                    return;
                }
            }
        }
        out.println(ans);
    }
}

class InputReader {
    StringTokenizer st;
    BufferedReader reader;
    String token;

    public InputReader(InputStream stream) {
        st = null;
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.lang.RuntimeException;

public class Main {
    public static void main(String[] args) throws IOException{
        InputReader reader = new InputReader();
        int N = reader.nextInt();
        if ( N == 1 ) {
            System.out.println(-1);
        } else if ( N == 2 ) {
            int x1 = reader.nextInt();
            int y1 = reader.nextInt();

            int x2 = reader.nextInt();
            int y2 = reader.nextInt();

            int x3 = x2;
            int y3 = y1;

            int x4 = x1;
            int y4 = y2;

            int height = (int)Math.sqrt( Math.pow(x1 - x3, 2) +
                                    Math.pow(y1 - y3, 2) );
            int width = (int)Math.sqrt( Math.pow(x1 - x4, 2) +
                                    Math.pow(y1 - y4, 2) );
            System.out.println(height * width);

        } else if ( N == 4 ) {
            int x1 = reader.nextInt();
            int y1 = reader.nextInt();

            int x2 = reader.nextInt();
            int y2 = reader.nextInt();

            int x3 = reader.nextInt();
            int y3 = reader.nextInt();

            int x4 = reader.nextInt();
            int y4 = reader.nextInt();

            int height = (int)Math.sqrt( Math.pow(x1 - x4, 2) +
                                    Math.pow(y1 - y4, 2) );
            int width = (int)Math.sqrt( Math.pow(x1 - x2, 2) +
                                    Math.pow(y2 - y2, 2) );
            System.out.println(height * width);

        }  else if ( N == 3 ) {
            int x1 = reader.nextInt();
            int y1 = reader.nextInt();

            int x2 = reader.nextInt();
            int y2 = reader.nextInt();

            int x3 = reader.nextInt();
            int y3 = reader.nextInt();

            int height = (int)Math.sqrt( Math.pow(x1 - x2, 2) +
                                    Math.pow(y1 - y2, 2) );
            int width = (int)Math.sqrt( Math.pow(x2 - x3, 2) +
                                    Math.pow(y2 - y3, 2) );
            System.out.println(height * width);

        }
    }
}
class InputReader {
    private StringTokenizer tokenizer;
    private BufferedReader reader;

    public InputReader() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = null;
    }

    public String nextLine() throws IOException{
        return reader.readLine();
    }

    public String next() {
        while ( tokenizer == null || !tokenizer.hasMoreTokens() ) {
            try {
                tokenizer = new StringTokenizer(nextLine());
            } catch(IOException e ) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}

import java.util.ArrayList;
import java.util.Scanner;

/**
 * Created by InfoLight on 15.11.2015.
 */
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int totalCount = in.nextInt();
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < totalCount * 2; i++){
            list.add(in.nextInt());
        }

        if (totalCount == 1) System.out.println(-1);
        else if (totalCount == 2){
            int result = 0;
            for (int i = 0; i < 4; i+=2){
                int x1 = list.get(i);
                int y1 = list.get(i + 1);
                if (x1 != 0 && y1 != 0){
                    result = x1 * y1;
                    break;
                }
            }
            if (list.get(0) == 0 && list.get(3) == 0){
                result = list.get(1) * list.get(2);
            } else if (list.get(1) == 0 && list.get(2) == 0){
                result  = list.get(0) * list.get(3);
            }
            if (result == 0) System.out.println(-1); else System.out.println(result);
        } else if (totalCount == 3){
            int result = 0;
            boolean thereIsTop = false;
            for (int i = 0; i < 6; i+=2){
                int x1 = list.get(i);
                int y1 = list.get(i + 1);
                if (x1 != 0 && y1 != 0){
                    thereIsTop = true;
                    result = x1 * y1;
                }
            }
            if (!thereIsTop){
                int needX1 = 0;
                int needY1 = 0;
                for (int i = 0 ; i < 6; i+=2){
                    int x1 = list.get(i);
                    int y1 = list.get(i + 1);
                    if (x1 != 0) needX1 = x1;
                    if (y1 != 0) needY1 = y1;
                }
                result = needX1 * needY1;
            }
            System.out.println(result);
        } else{
            int result = 0;
            for (int i = 0; i < 8; i += 2){
                int x1 = list.get(i);
                int y1 = list.get(i + 1);
                if (x1 != 0 && y1 != 0){
                    result = x1 * y1;
                    break;
                }
            }
            System.out.println(result);
        }

    }
}

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.io.FileInputStream;

public class Main {
    public static void main(String args[])throws IOException {
        //System.setIn(new FileInputStream("C:\\Users\\Admin\\IdeaProjects\\untitled\\out\\production\\untitled\\input.txt"));
        Scanner input = new Scanner(new InputStreamReader(System.in));
        int N = input.nextInt();
        TreeSet<Integer> x_coordinate = new TreeSet<Integer>();
        TreeSet<Integer> y_coordinate = new TreeSet<Integer>();
        TreeSet<Integer> side = new TreeSet<Integer>();
        for(int i = 0; i < N; i++){
            int x = input.nextInt();
            int y = input.nextInt();
            x_coordinate.add(x);
            y_coordinate.add(y);
        }
        if(x_coordinate.size() == 2 && y_coordinate.size() == 2) {

            System.out.println(Math.abs(x_coordinate.first() - x_coordinate.last())*Math.abs(y_coordinate.first() - y_coordinate.last()));
        }
        else
            System.out.println("NO");
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

public class Main {

	private static StreamTokenizer inputReader = new StreamTokenizer(
			new BufferedReader(new InputStreamReader(System.in)));

	public static int nextInt() {
		int a = -1;
		try {
			inputReader.nextToken();
			a = (int) inputReader.nval;
		} catch (Exception e) {
		}
		return a;
	}

	public static void main(String[] args) {
		int n = nextInt();

		int[] xs = new int[n];
		int[] ys = new int[n];

		List<Pair> pairs = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			xs[i] = nextInt();
			ys[i] = nextInt();

			Pair pair = new Pair(xs[i], ys[i]);
			pairs.add(pair);
		}

		Collections.sort(pairs);

		Pair p1 = pairs.get(0);
		Pair p2 = pairs.get(pairs.size() - 1);

		int area = (p1.x - p2.x) * (p1.y - p2.y);

		if (area != 0) {
		System.out.println(area);
		} else {
			System.out.println(-1);
		}
	}

	private static class Pair implements Comparable<Pair>{
		int x;
		int y;

		public Pair(int x, int y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public int compareTo(Pair other) {
			if (this.x != other.x) {
				return Integer.compare(this.x, other.x);
			}

			return Integer.compare(this.y, other.y);
		}
	}

}

import java.io.*;
import java.util.*;

public class Contest596A {

	public static void main(String[] args) throws Exception {
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(f.readLine());
		if(N==1) System.out.println(-1);
		int[][] coords = new int[N][2];

		for(int i = 0;i<N;i++){
			StringTokenizer st = new StringTokenizer(f.readLine());
			coords[i] = new int[]{Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken())};
		}

		if(N == 2){
			int x1 = coords[0][0];
			int y1 = coords[0][1];
			int x2 = coords[1][0];
			int y2 = coords[1][1];

			if(x1 != x2 && y1 != y2){
				System.out.println(Math.abs(x1-x2)*Math.abs(y1-y2));
			}
			else System.out.println(-1);
		}
		else{
			int x1 = -1001,x2 = -1001;
			int y1 = -1001,y2 = -1001;
			boolean found = false;
			for(int i = 0;i<N;i++){
				if(!found){
					x1 = coords[i][0];
					y1 = coords[i][1];
					found = true;
				}
				else{
					if(x2 == -1001) x2 = coords[i][0];
					if(y2 == -1001) y2 = coords[i][1];
				}
			}
			System.out.println(Math.abs(x1-x2)*Math.abs(y1-y2));
		}
	}

}

import java.util.Scanner;

public class Pool {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		if(n <= 1)
			System.out.print(-1);
		else {
			int width = 0;
			int height = 0;
			int[] xs = new int[n];
			int[] ys = new int[n];
			for(int i = 0; i < n; i++){
				xs[i] = s.nextInt();
				ys[i] = s.nextInt();
				if(i > 0) {
						height = Math.max(height, Math.abs(ys[i] - ys[i-1]));
						width = Math.max(width, Math.abs(xs[i] - ys[i-1]));
				}
			}
			if( width == 0 || height == 0)
				System.out.print(-1);
			else
				System.out.print(width*height);
		}
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A331 {

	public static void main(String[] args) throws IOException {
		   BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		    String in = input.readLine();
		    String[] init = in.split(" ");
		    int a = Integer.parseInt(init[0]);

		    if (a == 1){
		    	System.out.println(-1);
		    	return;
		    }

		    int maxX = Integer.MIN_VALUE;
		    int maxY = Integer.MIN_VALUE;
		    int minX = Integer.MAX_VALUE;
		    int minY = Integer.MAX_VALUE;
		    for(int i = 0; i < a; i++){
		    	in = input.readLine();
		    	init = in.split(" ");
		    	maxX = Math.max(maxX, Integer.parseInt(init[0]));
		    	minX = Math.min(minX, Integer.parseInt(init[0]));
		    	maxX = Math.max(maxX, Integer.parseInt(init[1]));
		    	minX = Math.min(minX, Integer.parseInt(init[1]));
		    }

		    if(maxX == minX){
		    	System.out.println(-1);
		    	return;
		    }
		    if(maxY == minY){
		    	System.out.println(-1);
		    	return;
		    }

		    System.out.println((maxX - minX) * (maxY - minY));
	}

}

import java.util.*;
import java.math.*;
import java.io.*;
import java.text.DecimalFormat;
public class Main{

    static int mod=1000000007 ;
    public static void main(String[] args)  throws IOException {
        s.init(System.in);
        PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int n=s.ni();
        int[] x=new int[n];
        int[] y=new int[n];
        for(int i=0;i<n;i++){
            x[i]=s.ni();
            y[i]=s.ni();
        }
        if(n==1)
            out.println(-1);
        else if(n==2){
            if((x[0]==x[1])||(y[0]==y[1]))
                out.println(-1);
            else {
                double z=(Math.pow(x[0]-x[1],2)+Math.pow(y[0]-y[1],2));
                z/=2;
                z=Math.sqrt(z);
                double a,b,c,d;

                out.println((long)(z*z));

            }
        }
        else if(n==3||n==4){
            long area=1;
            if(x[0]==x[1])
                area*=Math.abs(y[1]-y[0]);
            else if(x[0]==x[2])
                area*=Math.abs(y[2]-y[0]);
            else
                area=Math.abs(y[2]-y[1]);
            if(y[0]==y[1])
                area*=Math.abs(x[1]-x[0]);
            else if(y[0]==y[2])
                area*=Math.abs(x[2]-x[0]);
            else
                area*=Math.abs(x[2]-x[1]);
            out.println(area);

        }

        out.close();
    }

        public static class s {
        static BufferedReader reader;
        static StringTokenizer tokenizer;

        /** call this method to initialize reader for InputStream */
        static void init(InputStream input) {
            reader = new BufferedReader(
                        new InputStreamReader(input) );
            tokenizer = new StringTokenizer("");
        }

        /** get next word */
        static String ns() throws IOException {
            while ( ! tokenizer.hasMoreTokens() ) {
                //TODO add check for eof if necessary
                tokenizer = new StringTokenizer(
                    reader.readLine() );
            }
            return tokenizer.nextToken();
        }

        static int ni() throws IOException {
            return Integer.parseInt( ns() );
        }

        static double nd() throws IOException {
            return Double.parseDouble( ns() );
        }
        static long nl() throws IOException {
            return Long.parseLong( ns() );
        }

    }
}

import java.io.*;
import java.util.*;

public class A{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] pos = new int[n][2];
        for(int i = 0;i < n;i++){
            pos[i][0] = in.nextInt();
            pos[i][1] = in.nextInt();
        }
        if(n == 3 || n == 4){
            int dx = 0;
            int dy = 0;
            for(int i = 0;i < n;i++){
                for(int j = 0;j < n;j++){
                    dx = Math.max(dx, Math.abs(pos[i][0] - pos[j][0]));
                    dy = Math.max(dx, Math.abs(pos[i][1] - pos[j][1]));
                }
            }
            System.out.println(dx*dy);
        }
        else if(n == 2){
            if(pos[0][0] != pos[1][0] && pos[0][1] != pos[1][1]){
                System.out.println(Math.abs(pos[0][0] - pos[1][0])*Math.abs(pos[0][1]-pos[1][1]));
            }
            else{
                System.out.println(-1);
            }
        }
        else{
            System.out.println(-1);
        }
    }
}

import java.util.*;
public class Codef{
    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        int n=in.nextInt(),x,y,a,b;
        int[][] ar=new int[n][2];
        for (int i=0; i<n; i++){
            ar[i][0]=in.nextInt();
            ar[i][1]=in.nextInt();
        }
        if ((n==1)||((n==2)&((ar[1][0]==ar[0][0])|(ar[1][1]==ar[0][1])))){
            System.out.println(-1);
            return;
        }
        for (int i=1; i<n; i++){
            if ((ar[0][0]!=ar[i][0])&(ar[0][1]!=ar[i][1])){
                System.out.println(Math.abs(ar[0][0]-ar[i][0])*Math.abs(ar[0][1]-ar[i][1]));
                return;
            }
        }
    }
}

import java.io.*;
import java.util.*;
public class div331A
{
	BufferedReader in;
	PrintWriter ob;
	StringTokenizer st;
	public static void main(String[] args) throws IOException {
		new div331A().run();
	}
	void run() throws IOException {
		in=new BufferedReader(new InputStreamReader(System.in));
		ob=new PrintWriter(System.out);
		solve();
		ob.flush();
	}
	void solve() throws IOException {
		int n=ni();
		if(n==1)
			ob.println("-1");
		else if(n==2) {
			int x1=ni(),y1=ni(),x2=ni(),y2=ni();
			if(Math.abs(x2-x1)==0 || Math.abs(y2-y1)==0)
				ob.println("-1");
			else {
				ob.println(Math.abs((x2-x1)*(y2-y1)));
			}
		}
		else {
			int x1=0,y1=0,x2=0,y2=0;
			for (int i=1; i<=n ; i++ ) {
				int x=ni(),y=ni();
				if(i==1) {
					x1=x;
					y1=y;
				}
				else if(x!=x1 && y!=y1)  {
					x2=x;
					y2=y;
				}
			}
				ob.println(Math.abs((x2-x1)*(y2-y1)));
		}
 	}
	int ni() throws IOException {
		return Integer.parseInt(nextToken());
	}
	String nextToken() throws IOException {
		if(st==null || !st.hasMoreTokens())
			st=new StringTokenizer(in.readLine());
		return st.nextToken();
	}
}