#include <bits/stdc++.h>
using namespace std;
int x[5], y[5];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  if (n == 1)
    cout << "-1\n";
  else {
    for (int j = 0; j < n; j++)
      for (int i = 0; i < n; i++)
        if (x[i] != x[j] && y[i] != y[j]) {
          cout << (abs(x[i] - x[j]) * abs(y[i] - y[j])) << "\n";
          return 0;
        }
    cout << "-1\n";
  }
  return 0;
}
