#include #define rep(i, a) for (int i = 0; i < (a); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define repr(i, a) for (int i = (a) - 1; i >= 0; i--) #define repr2(i, a, b) for (int i = (b) - 1; i >= (a); i--) using namespace std; typedef long long ll; const ll inf = 1e9; const ll mod = 1e9 + 7; typedef ll D; typedef complex P; const D eps = 0; D dot(P a, P b) { return real(conj(a) * b); } D cross(P a, P b) { return imag(conj(a) * b); } bool comp(P a, P b) { if (a.real() != b.real()) return a.real() < b.real(); return a.imag() < b.imag(); } vector

convex_full(vector

&ps) { int n = ps.size(); sort(ps.begin(), ps.end(), comp); int k = 0; vector

qs(n * 2); for (int i = 0; i < n; i++) { while (k > 1 && cross(qs[k - 1] - qs[k - 2], ps[i] - qs[k - 1]) <= 0) k--; qs[k++] = ps[i]; } for (int i = n - 2, t = k; i >= 0; i--) { while (k > t && cross(qs[k - 1] - qs[k - 2], ps[i] - qs[k - 1]) <= 0) k--; qs[k++] = ps[i]; } qs.resize(k - 1); return qs; } int main() { vector

ps; rep (i, 5) { D x, y; cin >> x >> y; ps.emplace_back(x, y); } vector

cf = convex_full(ps); if (cf.size() == 5) { cout << "YES" << endl; } else { cout << "NO" << endl; } }