#include <bits/stdc++.h>
using namespace std;
long long int modpow(long long int a, long long int n, long long int temp) {
  long long int res = 1, y = a;
  while (n > 0) {
    if (n & 1) res = (res * y) % temp;
    y = (y * y) % temp;
    n /= 2;
  }
  return res % temp;
}
int main() {
  long long int n, x, y;
  vector<pair<int, int> > v;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    v.push_back(make_pair(x, y));
  }
  if (n == 1) {
    printf("-1\n");
    return 0;
  }
  sort(v.begin(), v.end());
  if (n == 2) {
    if (v[0].first == v[1].first || v[0].second == v[1].second) {
      printf("-1\n");
      return 0;
    } else {
      long long int ans =
          abs(v[0].first - v[1].first) * abs(v[0].second - v[1].second);
      cout << ans << endl;
      return 0;
    }
  } else if (n >= 3) {
    if (v[0].first == v[1].first) {
      long long int ans =
          abs(v[0].second - v[1].second) * abs(v[0].first - v[2].first);
      cout << ans << endl;
    } else {
      long long int ans =
          abs((v[0].first - v[1].first)) * abs(v[1].second - v[2].second);
      cout << ans << endl;
    }
  }
  return 0;
}
