#include <bits/stdc++.h>
using namespace std;
long long int a[100];
long long int b[100];
int main() {
  long long int n, t1, i;
  cin >> n;
  for (i = (0); i < (n); i++) {
    cin >> a[i];
    cin >> b[i];
  }
  if (n == 1)
    cout << "-1" << endl;
  else if (n == 2) {
    if (a[0] == a[1] || b[0] == b[1]) {
      cout << "-1" << endl;
    } else {
      long long int area = (abs(a[0] - a[1])) * (abs(b[0] - b[1]));
      cout << area << "" << endl;
    }
  } else if (n == 3) {
    long long int li, br;
    if (a[0] != a[1])
      li = abs(a[0] - a[1]);
    else
      li = abs(a[0] - a[2]);
    if (b[0] != b[1])
      br = abs(b[0] - b[1]);
    else
      br = abs(b[0] - b[2]);
    long long int a1 = li * br;
    cout << a1 << "" << endl;
  } else if (n == 4) {
    long long int li, br;
    if (a[0] != a[1])
      li = abs(a[0] - a[1]);
    else
      li = abs(a[0] - a[2]);
    if (b[0] != b[1])
      br = abs(b[0] - b[1]);
    else
      br = abs(b[0] - b[2]);
    long long int a1 = li * br;
    cout << a1 << "" << endl;
  }
  return 0;
}
