#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int> > xys(n, pair<int, int>(0, 0));
  for (int i = 0; i < xys.size(); i++) {
    scanf("%d%d", &(xys[i].first), &(xys[i].second));
  }
  if (n == 1) {
    printf("-1");
  } else if (n == 2) {
    if ((xys[0].first == xys[1].first) || (xys[0].second == xys[1].second)) {
      printf("-1");
    } else {
      int area =
          (xys[0].first - xys[1].first) * (xys[0].second - xys[1].second);
      if (area < 0) {
        area = -area;
      }
      printf("%d", area);
    }
  } else {
    int minx = 1001;
    int miny = 1001;
    int maxx = -1001;
    int maxy = -1001;
    for (int i = 0; i < n; i++) {
      if (xys[i].first < minx) {
        minx = xys[i].first;
      }
      if (xys[i].first > maxx) {
        maxx = xys[i].first;
      }
      if (xys[i].second < miny) {
        miny = xys[i].second;
      }
      if (xys[i].second > maxy) {
        maxy = xys[i].second;
      }
    }
    printf("%d", (maxx - minx) * (maxy - miny));
  }
  return 0;
};
