#include <bits/stdc++.h>
using namespace std;
long long n, x[10], y[10], i, j;
double a, b, c;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (i = 1; i <= n; i++)
    for (j = i + 1; j <= n; j++) {
      a = sqrt((x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]));
      if (a == 0) {
        cout << 0;
        return 0;
      }
      b = abs(x[i] - x[j]);
      c = abs(y[i] - y[j]);
      if (a != b && a != c) {
        cout << abs(x[i] - x[j]) * abs(y[i] - y[j]);
        return 0;
      }
    }
  cout << -1;
  return 0;
}
