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