#include #include #include using namespace std; #define RREP(i,s,e) for (i = s; i >= e; i--) #define rrep(i,n) RREP(i,n-1,0) #define REP(i,s,e) for (i = s; i < e; i++) #define rep(i,n) REP(i,0,n) #define INF 100000000 typedef long long ll; typedef pair P; int det(P a, P b) { return a.first * b.second - a.second * b.first; } P operator-(P a, P b) { return make_pair(a.first-b.first,a.second-b.second); } bool cmp(P a, P b) { if (a.first == b.first) return a.second > b.second; else return a.first < b.first; } int main() { int i, k; P p[5], out[5]; rep (i,5) { int x, y; cin >> x >> y; p[i] = make_pair(x,y); } sort(p,p+5,cmp); k = 0; rep (i,5) { while (k > 1 && det(out[k-1]-out[k-2],p[i]-out[k-1]) <= 0) k--; out[k++] = p[i]; } rrep(i,5) { while (k > 1 && det(out[k-1]-out[k-2],p[i]-out[k-1]) <= 0) k--; out[k++] = p[i]; } k--; if (k == 5) cout << "YES" << endl; else cout << "NO" << endl; return 0; }