#include using namespace std; #define rep(i,a,b) for(int i=a;i P; namespace std { bool operator < (const P& a, const P& b) { return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b); } } double cross(const P& a, const P& b) { return imag(conj(a)*b); } double dot(const P& a, const P& b) { return real(conj(a)*b); } struct L : public vector

{ L() {} L(const P &a, const P &b) { push_back(a); push_back(b); } }; typedef vector

G; int main() { cin.tie(0); ios::sync_with_stdio(false); double x, y; vector

ps(5); while (cin >> x >> y) { ps[0] = P(x, y); rep(i, 1, 5) { cin >> x >> y; ps[i] = P(x, y); } sort(ps.begin(), ps.end()); string ans = "NO"; do { bool ok = true; rep(i, 0, 5) { int s = i; int t = (i + 1) % 5; int cnt = 0; rep(j, 0, 5) if (j != s && j != t) { if (cross(ps[t] - ps[s], ps[j] - ps[s]) < 0) cnt++; } if (cnt != 1) ok = false; } if (ok) { ans = "YES"; break; } } while (next_permutation(ps.begin(), ps.end())); cout << ans << endl; } }