#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, x1, y1, ar[5], ar1[5];
  cin >> n;
  if (n == 1) {
    cout << -1 << endl;
    return 0;
  } else if (n == 2) {
    cin >> x >> y >> x1 >> y1;
    if (x != x1 && y != y1) {
      cout << abs((x - x1) * (y - y1)) << endl;
      return 0;
    }
  } else if (n == 3) {
    for (int i = 0; i < 3; i++) {
      cin >> ar[i] >> ar1[i];
    }
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < 3; j++) {
        if (ar[i] != ar[j] && ar1[i] != ar1[j]) {
          cout << abs((ar[i] - ar[j]) * (ar1[i] - ar1[j])) << endl;
          return 0;
        }
      }
    }
  } else if (n == 4) {
    for (int i = 0; i < 4; i++) {
      cin >> ar[i] >> ar1[i];
    }
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < 4; j++) {
        if (ar[i] != ar[j] && ar1[i] != ar1[j]) {
          cout << abs((ar[i] - ar[j]) * (ar1[i] - ar1[j])) << endl;
          return 0;
        }
      }
    }
  }
  cout << -1 << endl;
}
