#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, d, e, f, g, h;
  cin >> n;
  if (n == 1) {
    cin >> a >> b;
    cout << -1 << endl;
  } else if (n == 2) {
    cin >> a >> b;
    cin >> c >> d;
    if (a == c || b == d)
      cout << -1 << endl;
    else
      cout << (abs(a - c) * abs(b - d)) << endl;
  } else if (n == 3) {
    cin >> a >> b;
    cin >> c >> d;
    cin >> e >> f;
    if (a != c && b != d)
      cout << (abs(a - c) * abs(b - d)) << endl;
    else if (a != e && b != f)
      cout << (abs(a - e) * abs(b - f)) << endl;
    else
      cout << (abs(c - e) * abs(d - f)) << endl;
  } else {
    cin >> a >> b;
    cin >> c >> d;
    cin >> e >> f;
    cin >> g >> h;
    if (a != c && b != d)
      cout << (abs(a - c) * abs(b - d)) << endl;
    else if (a != e && b != f)
      cout << (abs(a - e) * abs(b - f)) << endl;
    else
      cout << (abs(a - g) * abs(b - h)) << endl;
  }
  return 0;
}
