#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int i, j, n, x[4], y[4], a = 0, b = 0;
  cin >> n;
  for (i = 0; i < n; i++) cin >> x[i] >> y[i];
  if (n == 3) {
    for (i = 0; i < n; i++) {
      for (j = i + 1; j < n; j++) {
        if (x[i] == x[j]) b = abs(y[i] - y[j]);
        if (y[i] == y[j]) a = abs(x[i] - x[j]);
      }
    }
    cout << a * b << "\n";
  } else if (n == 4) {
    for (i = 0; i < n; i++) {
      for (j = i + 1; j < n; j++) {
        if (x[i] == x[j]) b = abs(y[i] - y[j]);
        if (y[i] == y[j]) a = abs(x[i] - x[j]);
      }
    }
    cout << a * b << "\n";
  } else if (n == 1)
    cout << "-1\n";
  else {
    if (x[0] == x[1] or y[0] == y[1])
      cout << "-1\n";
    else {
      a = abs(x[0] - x[1]);
      b = abs(y[0] - y[1]);
      cout << a * b << "\n";
    }
  }
  return 0;
}
