//
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>

using namespace std;


bool Solution(double ab, double ac, double ad, double bc, double bd, double cd)
{
    double sq1 = 0.0;
    double sq2 = 0.0;
    
    double S;
    double f;
    
    /*sq1*/
    f = (ab + ac + bc) * 0.5;   //judge formula
    S = sqrt(f * (f - ab) * (f - ac) * (f - bc));
    sq1 += S;
    
    f = (ac + ad + cd) * 0.5;
    S = sqrt(f * (f - ac) * (f - ad) * (f - cd));
    sq1 += S;
    
    /*sq2*/
    f = (ab + ad + bd) * 0.5;
    S = sqrt(f * (f - ab) * (f - ad) * (f - bd));
    sq2 += S;
    
    f = (bc + bd + cd) * 0.5;
    S = sqrt(f * (f - bc) * (f - bd) * (f - cd));
    sq2 += S;
    
    if (fabs(sq1 - sq2) <= 0.01)
    {
        return true;
    }
    else
    {
        return false;
    }

}

int main()
{
    double xa, ya;
    double xb, yb;
    double xc, yc;
    double xd, yd;
    
    double ab;   //module
    double ac;
    double ad;
    double bc;
    double bd;
    double cd;
    
    while(cin>>xa>>ya>>xb>>yb>>xc>>yc>>xd>>yd)
    {
        
        ab = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
        ac = sqrt((xa - xc) * (xa - xc) + (ya - yc) * (ya - yc));
        ad = sqrt((xa - xd) * (xa - xd) + (ya - yd) * (ya - yd));
        bc = sqrt((xb - xc) * (xb - xc) + (yb - yc) * (yb - yc));
        bd = sqrt((xb - xd) * (xb - xd) + (yb - yd) * (yb - yd));
        cd = sqrt((xc - xd) * (xc - xd) + (yc - yd) * (yc - yd));
        
        if (Solution(ab, ac, ad, bc, bd, cd))
        {
            cout<<"YES"<<endl;
        }
        else
        {
            cout<<"NO"<<endl;
        }
    }

    return 0;
}