#include <bits/stdc++.h>
using namespace std;
int getn() {
  int h;
  scanf("%d", &h);
  return h;
}
template <class T, class U>
ostream& operator<<(ostream& out, const pair<T, U>& par) {
  cout << par.first << " " << par.second << endl;
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  for (int i = 0; i < v.size(); i++) {
    if (i) cout << " ";
    cout << v[i];
  }
  cout << endl;
  return out;
}
int main() {
  int n = getn();
  if (n < 2) cout << "-1";
  if (n < 2) return 0;
  if (n == 2) {
    int xa, xb, ya, yb;
    cin >> xa >> ya >> xb >> yb;
    if (xa != xb && ya != yb) {
      cout << abs(xa - xb) * abs(ya - yb) << endl;
    } else
      cout << -1 << endl;
    return 0;
  }
  vector<pair<int, int> > one;
  for (int i = 0; i < n; i++) one.push_back(make_pair((getn()), (getn())));
  if (n > 2) {
    if (one[0].first != one[1].first && one[1].second != one[0].second) {
      cout << abs(one[1].first - one[0].first) *
                  abs(one[0].second - one[1].second)
           << endl;
    } else if (one[0].first != one[2].first && one[2].second != one[0].second) {
      cout << abs(one[2].first - one[0].first) *
                  abs(one[0].second - one[2].second)
           << endl;
    } else if (one[1].first != one[2].first && one[2].second != one[1].second) {
      cout << abs(one[2].first - one[1].first) *
                  abs(one[1].second - one[2].second)
           << endl;
    }
  }
}
