#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n;
  cin >> n;
  if (n == 1) {
    int x, y;
    cin >> x >> y;
    cout << -1 << endl;
  } else if (n == 2) {
    int x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    if ((x1 == x2) || (y1 == y2)) {
      cout << -1 << endl;
    } else {
      cout << (abs(x1 - x2) * abs(y1 - y2)) << endl;
    }
  } else if (n == 3) {
    vector<int> x;
    vector<int> y;
    for (int i = 0; i < 3; i++) {
      int a, b;
      cin >> a >> b;
      x.push_back(a);
      y.push_back(b);
    }
    int maxi1 = 0, maxi2 = 0;
    for (int i = 1; i < x.size(); i++) {
      if (abs(x[0] - x[i]) > maxi1) maxi1 = abs(x[0] - x[i]);
    }
    for (int i = 1; i < y.size(); i++) {
      if (abs(y[0] - y[i]) > maxi2) maxi2 = abs(y[0] - y[i]);
    }
    cout << (maxi1 * maxi2) << endl;
  } else {
    vector<int> x;
    vector<int> y;
    for (int i = 0; i < 4; i++) {
      int a, b;
      cin >> a >> b;
      x.push_back(a);
      y.push_back(b);
    }
    int maxi1 = 0, maxi2 = 0;
    for (int i = 1; i < x.size(); i++) {
      if (abs(x[0] - x[i]) > maxi1) maxi1 = abs(x[0] - x[i]);
    }
    for (int i = 1; i < y.size(); i++) {
      if (abs(y[0] - y[i]) > maxi2) maxi2 = abs(y[0] - y[i]);
    }
    cout << (maxi1 * maxi2) << endl;
  }
  return 0;
}
