function intersect(x1,y1,x2,y2,x3,y3,x4,y4) {
  var
  c = ((x1-x2)*(y3-y1)+(y1-y2)*(x1-x3))*((x1-x2)*(y4-y1)+(y1-y2)*(x1-x4)),
  ta = (x3-x4)*(y1-y3)+(y3-y4)*(x3-x1),
  tb = (x3-x4)*(y2-y3)+(y3-y4)*(x3-x2);
  
  return c < 0 && ta * tb < 0;
}
 
function inTriangle(x1,y1,x2,y2,x3,y3,x4,y4) {
  var
  ta = !intersect(x1,y1,x2,y2,x3,y3,x4,y4),
  tb = !intersect(x2,y2,x3,y3,x1,y1,x4,y4),
  tc = !intersect(x3,y3,x1,y1,x2,y2,x4,y4);
  
  return ta&&tb&&tc;
}

function main() {
  input.forEach(function(line) {
    if(line.trim() === '') return;
    console.log(inTriangle.apply(null, line.split(' ').map(parseFloat)) ? 'YES' : 'NO');
  });
}

var
input = '';

process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
  input += chunk;
});
process.stdin.on('end', function() {
  input = input.split('\n');
  main();
});