#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000;
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) {
    x = _x;
    y = _y;
  }
  Point operator-(const Point &B) const { return Point(x - B.x, y - B.y); }
} p[maxn];
double eps = 1e-10;
int dcmp(double x) {
  if (fabs(x) < eps)
    return 0;
  else
    return x < 0 ? -1 : 1;
}
double Cross(Point A, Point B) { return A.x * B.y - A.y * B.x; }
bool isConvex(Point *p, int n) {
  p[n] = p[0];
  p[n + 1] = p[1];
  int now = dcmp(Cross(p[1] - p[0], p[2] - p[1]));
  for (int i = 1; i < n; i++) {
    int next = dcmp(Cross(p[i + 1] - p[i], p[i + 2] - p[i + 1]));
    if (now * next < 0) {
      return false;
    }
    now = next;
  }
  return true;
}
int main() {
  int n = 4;
  while (cin >> p[0].x >> p[0].y) {
    for (int i = 1; i < 4; i++) scanf("%lf%lf", &p[i].x, &p[i].y);
    bool flag = isConvex(p, n);
    if (flag)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
