#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, M = 1e9 + 7;
int x[N], y[N];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  if (n == 1)
    puts("-1");
  else if (n == 2) {
    if (x[0] == x[1] || y[0] == y[1])
      puts("-1");
    else
      cout << abs(x[0] - x[1]) * abs(y[0] - y[1]) << endl;
  } else {
    int p, q;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        if (x[i] == x[j]) p = abs(y[i] - y[j]);
        if (y[i] == y[j]) q = abs(x[i] - x[j]);
      }
    }
    cout << p * q << endl;
  }
  return 0;
}
