#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[4][2];
  int n;
  while (cin >> n) {
    if (n == 1) {
      cin >> a[0][0] >> a[0][1];
      cout << -1;
      continue;
    }
    for (int i = 0; i < n; i++) {
      cin >> a[i][0] >> a[i][1];
    }
    bool it = false;
    for (int i = 0; i < n - 1; i++) {
      for (int j = i + 1; j < n; j++) {
        if (a[i][0] != a[j][0] && a[i][1] != a[j][1]) {
          cout << abs(a[i][0] - a[j][0]) * abs(a[i][1] - a[j][1]) << endl;
          it = true;
          break;
        }
      }
      if (it) break;
    }
    if (!it) cout << -1 << endl;
  }
  return 0;
}
