#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
  double x1, y1, x2, y2, x3, y3, xp, yp;
  while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp){
    if(y1 < y2){
      swap(x1, x2);
      swap(y1, y2);
    }
    if(y1 < y3){
      swap(x1, x3);
      swap(y1, y3);
    }    
    if((((x2 - x1) != 0) ? (yp < (y2 -y1) / (x2 - x1) * (xp - x1) + y1) : (0 < (y2 - y1) * (xp - x1))) && (((x3 - x1) != 0) ? (yp < (y3 -y1) / (x3 - x1) * (xp - x1) + y1) : (0 < (y3 - y1) * (xp - x1))) && (((x2 - x3) != 0) ? (yp > (y2 -y3) / (x2 - x3) * (xp - x3) + y3) : (0 > (y2 - y3) * (xp - x3)))){
	cout << "YES" << endl;
      }else{
      cout << "NO" << endl;
    }
  }
}