#include <bits/stdc++.h>
using namespace std;
int x[4], y[4];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < (n); i++) cin >> x[i] >> y[i];
  if (n == 1) {
    cout << -1 << endl;
    return 0;
  }
  if (n == 2) {
    if (x[0] != x[1] && y[0] != y[1]) {
      cout << abs((x[1] - x[0]) * (y[1] - y[0])) << endl;
      return 0;
    } else {
      cout << -1 << endl;
      return 0;
    }
  }
  if (n == 3) {
    if (x[0] != x[1] && y[0] != y[1]) {
      cout << abs((x[1] - x[0]) * (y[1] - y[0])) << endl;
      return 0;
    }
    if (x[1] != x[2] && y[1] != y[2]) {
      cout << abs((x[2] - x[1]) * (y[2] - y[1])) << endl;
      return 0;
    }
    if (x[0] != x[2] && y[0] != y[2]) {
      cout << abs((x[2] - x[0]) * (y[2] - y[0])) << endl;
      return 0;
    }
  }
  if (n == 4) {
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < 4; j++) {
        if (i != j) {
          if (x[i] != x[j] && y[i] != y[j]) {
            cout << abs((x[i] - x[j]) * (y[i] - y[j])) << endl;
            return 0;
          }
        }
      }
    }
  }
}
