#include #include using namespace std; struct P{ int x, y; P operator-(const P& p){ P q; q.x = x - p.x, q.y = y - p.y; return q; } }; int cross(P p1, P p2){ return p1.x*p2.y - p1.y*p2.x; } P ps[5]; int main(){ for(int i=0;i<5;++i) cin >> ps[i].x >> ps[i].y; vector ok(5, true); for(int i=0;i<5;++i) for(int j=i+1;j<5;++j) for(int k=j+1;k<5;++k){ for(int h=0;h<5;++h){ if(i == h || j == h || k == h) continue; int c1 = cross(ps[j]-ps[i],ps[h]-ps[j]); int c2 = cross(ps[k]-ps[j],ps[h]-ps[k]); int c3 = cross(ps[i]-ps[k],ps[h]-ps[i]); if((c1<=0&&c2<=0&&c3<=0)||(c1>=0&&c2>=0&&c3>=0)) ok[h] = false; } } int cnt = 0; for(int i=0;i<5;++i) if(ok[i]) ++cnt; cout << (cnt == 5? "YES": "NO") << endl; }