#include <bits/stdc++.h>
using namespace std;
int n, x[4], y[4], licz_x = 0, licz_y = 0, pam = 0, ilosc = 0, a, b, wynik;
int main() {
  cin >> n;
  while (n < 1 || n > 4) {
    cin >> n;
  }
  if (n == 1) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  for (int j = 1; j < n; j++) {
    if (x[0] != x[j]) {
      ilosc++;
      if (ilosc > 2) {
        cout << "-1" << endl;
        return 0;
      }
      if (pam == 0) {
        pam = 1;
        a = x[j];
        licz_x++;
      }
    }
  }
  ilosc = 0;
  pam = 0;
  for (int k = 1; k < n; k++) {
    if (y[0] != y[k]) {
      ilosc++;
      if (ilosc > 2) {
        cout << "-1" << endl;
        return 0;
      }
      if (pam == 0) {
        pam = 1;
        b = y[k];
        licz_y++;
      }
    }
  }
  if (licz_x == 1 && licz_y == 1) {
    wynik = (x[0] - a) * (y[0] - b);
    if (wynik == 0) {
      cout << "1" << endl;
    } else if (wynik < 0) {
      cout << (-1) * wynik << endl;
    } else if (wynik > 0) {
      cout << wynik << endl;
    }
  } else {
    cout << "-1" << endl;
  }
  return 0;
}
