#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  pair<long long, long long> x[n];
  for (int i = 0; i < n; i++) cin >> x[i].first >> x[i].second;
  if (n == 1 ||
      (n == 2 && (x[0].first == x[1].first || x[0].second == x[1].second))) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i < n; i++) {
    if (x[i].first != x[0].first && x[i].second != x[0].second) {
      cout << abs(x[i].first - x[0].first) * abs(x[i].second - x[0].second);
      return 0;
    }
  }
  cout << abs(x[1].first - x[2].first) * abs(x[1].second - x[2].second);
  return 0;
}
