#include <bits/stdc++.h>
using namespace std;
long long n, m, k, ans, x[111111], y[1111];
int main() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
  sort(x + 1, x + 1 + n);
  sort(y + 1, y + 1 + n);
  if (n == 1) {
    cout << -1;
    return 0;
  }
  if (n == 2) {
    if (x[1] == x[2] || y[1] == y[2]) {
      cout << -1;
      return 0;
    }
  }
  cout << ((x[n] - x[1]) * (y[n] - y[1]));
}
