#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair i_i; typedef pair ll_i; typedef pair d_i; typedef pair ll_ll; typedef pair d_d; struct edge { int u, v; ll w; }; ll MOD = 1000000007; ll _MOD = 1000000009; double EPS = 1e-10; int det(int x1, int y1, int x2, int y2) { return x1 * y2 - x2 * y1; } int main() { vector x(5), y(5); for (int i = 0; i < 5; i++) cin >> x[i] >> y[i]; for (int i = 0; i < 5; i++) { bool ok = false; for (int j = 0; j < 5; j++) { if (j == i) continue; int dx = x[j] - x[i], dy = y[j] - y[i]; vector d; for (int k = 0; k < 5; k++) { if (k == i || k == j) continue; d.push_back(det(dx, dy, x[k] - x[i], y[k] - y[i])); } sort(d.begin(), d.end()); if (d[0] * d[2] > 0) ok = true; } if (!ok) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; }