#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int t1, t2;
  set<int> xs, ys;
  for (long long i = 0; i < n; i++) {
    cin >> t1 >> t2;
    xs.insert(t1);
    ys.insert(t2);
  }
  if (xs.size() == 2 && ys.size() == 2) {
    auto it1 = xs.begin(), it2 = ys.begin();
    int ans = abs(*(it1++) - *it1) * abs(*(it2++) - *it2);
    cout << ans;
  } else {
    cout << -1;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
