#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) 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; for (int i = 0; i < ps->size(); i++) { while (k >= 2 && (q[k-1]-q[k-2]).det((*ps)[i]-q[k-1]) <= 0) k--; q[k++] = (*ps)[i]; } int t = k; for (int i = ps->size()-2; i >= 0; i--) { while (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; }