#include <bits/stdc++.h>
int main() {
  double data[8], ta[2], tb[2], ad[2], ab[2], bc[2], nai[4];
  int i, flag;
  while (1) {
    for (i = 0; i < 8; i++) {
      if (i == 0) {
        if (scanf("%lf", &data[i]) == EOF) return 0;
      } else
        scanf("%lf", &data[i]);
    }
    ta[0] = data[4] - data[0];
    ta[1] = data[5] - data[1];
    tb[0] = data[6] - data[2];
    tb[1] = data[7] - data[3];
    ad[0] = data[6] - data[0];
    ad[1] = data[7] - data[1];
    ab[0] = data[2] - data[0];
    ab[1] = data[3] - data[1];
    bc[0] = data[4] - data[2];
    bc[1] = data[5] - data[3];
    nai[0] = ta[0] * ab[1] - ta[1] * ab[0];
    nai[1] = ta[0] * ad[1] - ta[1] * ad[0];
    nai[2] = tb[0] * ab[1] - tb[1] * ab[0];
    nai[3] = tb[0] * bc[1] - tb[1] * bc[0];
    if (nai[1] < 0 && nai[0] < 0 || nai[1] > 0 && nai[0] > 0 ||
        nai[2] < 0 && nai[3] < 0 || nai[2] > 0 && nai[3] > 0) {
      printf("NO\n");
    } else
      printf("YES\n");
  }
  return 0;
}
