#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, y1, x2, y2, x3, y3, x5, y5, x = 0, y = 0, n, ans = 0;
  cin >> n;
  if (n == 1) {
    cin >> x1 >> y1;
  } else if (n == 2) {
    cin >> x1 >> y1 >> x2 >> y2;
    if ((x1 - x2) != 0) {
      if (x1 > x2)
        x = x1 - x2;
      else
        x = x2 - x1;
    }
    if ((y1 - y2) != 0) {
      if (y1 > y2)
        y = y1 - y2;
      else
        y = y2 - y1;
    }
    ans = x * y;
  } else if (n == 3) {
    for (int i = 0; i < n; i++) {
      cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
    }
    if ((x1 - x2) != 0) {
      if (x1 > x2)
        x = x1 - x2;
      else
        x = x2 - x1;
    } else if ((x1 - x3) != 0) {
      if (x1 > x3)
        x = x1 - x3;
      else
        x = x3 - x1;
    } else if ((x2 - x3) != 0) {
      if (x2 > x3)
        x = x2 - x3;
      else
        x = x3 - x2;
    }
    if ((y1 - y2) != 0) {
      if (y1 > y2)
        y = y1 - y2;
      else
        y = y2 - y1;
    } else if ((y1 - y3) != 0) {
      if (y1 > y3)
        y = y1 - y3;
      else
        y = y3 - y1;
    } else if ((y2 - y3) != 0) {
      if (y2 > y3)
        y = y2 - y3;
      else
        y = y3 - y2;
    }
    ans = x * y;
  } else if (n == 4) {
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x5 >> y5;
    if ((x1 - x2) != 0) {
      if (x1 > x2)
        x = x1 - x2;
      else
        x = x2 - x1;
    } else if ((x1 - x3) != 0) {
      if (x1 > x3)
        x = x1 - x3;
      else
        x = x3 - x1;
    } else if ((x2 - x3) != 0) {
      if (x2 > x3)
        x = x2 - x3;
      else
        x = x3 - x2;
    }
    if ((y1 - y2) != 0) {
      if (y1 > y2)
        y = y1 - y2;
      else
        y = y2 - y1;
    } else if ((y1 - y3) != 0) {
      if (y1 > y3)
        y = y1 - y3;
      else
        y = y3 - y1;
    } else if ((y2 - y3) != 0) {
      if (y2 > y3)
        y = y2 - y3;
      else
        y = y3 - y2;
    }
    ans = x * y;
  }
  if (ans == 0) ans = -1;
  cout << ans;
  return 0;
}
