#include #include using namespace std; 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, t; P p[5], out[5]; for (i = 0; i < 5; i++) { int x, y; cin >> x >> y; p[i] = make_pair(x,y); } sort(p,p+5,cmp); k = 0; for (i = 0; i < 5; i++) { while (k > 1 && det(out[k-1]-out[k-2],p[i]-out[k-1]) <= 0) k--; out[k++] = p[i]; } for (i = 4, t = k; i >= 0; i--) { while (k > t && 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; }