#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) #define RREP(i, n) for(int i=(n-1); i>=0; i--) #define ALL(a) (a).begin(),(a).end() struct P { int x, y; P(){}; P(int _x, int _y): x(_x), y(_y){}; P operator - (P q) { return P(x - q.x, y - q.y); } int det(P q) { return x * q.y - y * q.x; } }; vector

ps; bool comp(P p, P q) { if (p.x != q.x) return p.x < q.x; return p.y < q.y; } vector

convex_hull(vector

*ps) { sort(ps->begin(), ps->end(), comp); vector

q(ps->size() * 2); int k = 0; REP(i,ps->size()) { if (k >= 2 && (q[k-1]-q[k-2]).det((*ps)[i]-q[k-1]) <= 0) k--; q[k++] = (*ps)[i]; } int t = k; RREP(i,ps->size()-1) { if (k > t && (q[k-1]-q[k-2]).det((*ps)[i]-q[k-1]) <= 0) k--; q[k++] = (*ps)[i]; } q.resize(k-1); return q; } signed main() { int x,y; REP(i,5) { cin >> x >> y; ps.push_back(P(x,y)); } cout << ((convex_hull(&ps).size() == 5) ? "YES" : "NO") << endl; return 0; }