#include <bits/stdc++.h>
using namespace std;
int x, a, b, mx = 2500, Mx = -2500, my = 2500, My = -2500, ans;
int main() {
  cin >> x;
  for (int i = 1; i <= x; i++) {
    cin >> a >> b;
    mx = min(mx, a);
    Mx = max(Mx, a);
    my = min(my, b);
    My = max(My, b);
  }
  if (x == 1 || mx == Mx || my == My) {
    cout << -1 << endl;
  } else {
    ans = (Mx - mx) * (My - my);
    cout << ans << endl;
  }
}
