#include <bits/stdc++.h>   using namespace std;   int main() {     int n, x[5], y[5], i;     cin >> n;     for (i = 1; i <= n; i++) cin >> x[i] >> y[i];     if (n == 1)       cout << -1;     else if (n == 2) {       if (x[1] != x[2] && y[1] != y[2])         cout << abs(x[1] - x[2]) * abs(y[1] - y[2]);       else         cout << -1;     } else if (n == 3) {       if (x[1] == x[2] && y[1] == y[3])         cout << abs(y[2] - y[1]) * abs(x[3] - x[1]);       else if (x[1] == x[2] && y[2] == y[3])         cout << abs(y[2] - y[1]) * abs(x[3] - x[2]);       else if (x[2] == x[3] && y[2] == y[1])         cout << abs(y[2] - y[3]) * abs(x[2] - x[1]);       else if (x[2] == x[3] && y[3] == y[1])         cout << abs(y[2] - y[3]) * abs(x[3] - x[1]);       else if (x[1] == x[3] && y[2] == y[1])         cout << abs(y[1] - y[3]) * abs(x[2] - x[1]);       else if (x[1] == x[3] && y[3] == y[2])         cout << abs(y[1] - y[3]) * abs(x[3] - x[2]);     } else if (n == 4) {       int x1 = 10000, x2 = -10000, y1 = 10000, y2 = -10000;       for (i = 1; i <= 4; i++) {         if (x[i] < x1) x1 = x[i];         if (x[i] > x2) x2 = x[i];         if (y[i] < y1) y1 = y[i];         if (y[i] > y2) y2 = y[i];       }       cout << (x2 - x1) * (y2 - y1);     }   }   