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