#include <iostream>
#include <cmath>
using namespace std;
double povrsina(int x1, int y1, int x2, int y2, int x3, int y3);
int main()
{
    int n,x1,x2,x3,x4,y1,y2,y3,y4;
    double p1,p2,p3,p4,pmin;
    cin >> n;
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
    p1 = povrsina(x1,y1,x2,y2,x3,y3);
    p2 = povrsina(x1,y1,x2,y2,x4,y4);
    p3 = povrsina(x1,y1,x3,y3,x4,y4);
    p4 = povrsina(x2,y2,x3,y3,x4,y4);
    if(p1 > p2)
        pmin = p2;
    else
        pmin = p1;
    if(pmin > p3)
        pmin = p3;
    if(pmin > p4)
        pmin = p4;
    cout << pmin;
}
double povrsina(int x1, int y1, int x2, int y2, int x3, int y3)
{
    return abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2))/2.0);
}