Language: C++

import java.util.*;   
import java.lang.*;   
import java.math.*;   
import java.io.*; 

public class Main {
	Scanner sc;
	void run() {
		sc = new Scanner(System.in);
		Point[] a = new Point [4]; 
		while (sc.hasNext()){
			for (int i=0;i<4;i++) {
				double x = sc.nextDouble();
				double y = sc.nextDouble();
				a[i] = new Point(x,y);
			}
			Line[] l = new Line[3];
			Line[] lc = new Line [3];
			boolean flg = true;
			for (int i=0;i<3;i++) {
				l[i] = new Line(a[i%3], a[(i+1)%3]);
				lc[i] = new Line(a[(i+2)%3], a[3]);
				if (l[i].judgeCloss(lc[i])) {
					flg = false;
					break;
				}
			}
			if (flg)
				System.out.println("YES");
			else System.out.println("NO");
			
		}
		
	}
	public static void main(String[] args) {
		new Main().run();
	}
	
	
}
class Point {
	private double x;
	private double y;
	public Point(double x, double y) {
		this.x = x;
		this.y = y;
	}
	public double getX(){
		return x;
	}
	public double getY() {
		return y;
	}
}

class Line {
	Point a1;
	Point a2;
	public Line (Point a, Point b) {
		a1 = a;
		a2 = b;
	}
	public Point getS() {
		return a1;
	}
	public Point getE() {
		return a2;
	}
	public boolean judgeCloss(Line l) {
		double a = ( (a1.getY() - l.getS().getY()) * (l.getS().getX() - l.getE().getX() - (l.getS().getY() - l.getE().getY()) * (a1.getX() - l.getS().getX())) );
		double b = ( (a2.getY() - l.getS().getY()) * (l.getS().getX() - l.getE().getX() - (l.getS().getY() - l.getE().getY()) * (a2.getX() - l.getS().getX())) );
		
//		System.out.println( a + " " + b );
		
		if (a*b >= 0)
			return false;
		else return true;
	}

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.lang.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.math.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
a.cc:42:16: error: expected ':' before 'double'
   42 |         private double x;
      |                ^~~~~~~
      |                :
a.cc:43:16: error: expected ':' before 'double'
   43 |         private double y;
      |                ^~~~~~~
      |                :
a.cc:44:15: error: expected ':' before 'Point'
   44 |         public Point(double x, double y) {
      |               ^~~~~~
      |               :
a.cc:48:15: error: expected ':' before 'double'
   48 |         public double getX(){
      |               ^~~~~~~
      |               :
a.cc:51:15: error: expected ':' before 'double'
   51 |         public double getY() {
      |               ^~~~~~~
      |               :
a.cc:54:2: error: expected ';' after class definition
   54 | }
      |  ^
      |  ;
a.cc: In constructor 'Point::Point(double, double)':
a.cc:45:22: error: request for member 'x' in '(Point*)this', which is of pointer type 'Point*' (maybe you meant to use '->' ?)
   45 |                 this.x = x;
      |                      ^
a.cc:46:22: error: request for member 'y' in '(Point*)this', which is of pointer type 'Point*' (maybe you meant to use '->' ?)
   46 |                 this.y = y;
      |                      ^
a.cc: At global scope:
a.cc:59:15: error: expected ':' before 'Line'
   59 |         public Line (Point a, Point b) {
      |               ^~~~~
      |               :
a.cc:63:15: error: expected ':' before 'Point'
   63 |         public Point getS() {
      |               ^~~~~~
      |               :
a.cc:66:15: error: expected ':' before 'Point'
   66 |         public Point getE() {
      |               ^~~~~~
      |               :
a.cc:69:15: error: expected ':' before 'boolean'
   69 |         public boolean judgeCloss(Line l) {
      |               ^~~~~~~~
      |               :
a.cc:69:16: error: 'boolean' does not name a type; did you mean 'bool'?
   69 |         public boolean judgeCloss(Line l) {
      |                ^~~~~~~
      |                bool
a.cc:80:2: error: expected ';' after class definition
   80 | }
      |  ^
      |  ;
a.cc: In constructor 'Line::Line(Point, Point)':
a.cc:59:40: error: no matching function for call to 'Point::Point()'
   59 |         public Line (Point a, Point b) {
      |                                        ^
a.cc:44:16: note: candidate: 'Point::Point(double, double)'
   44 |         public Point(double x, double y) {
      |                ^~~~~
a.cc:44:16: note:   candidate expects 2 arguments, 0 provided
a.cc:41:7: note: candidate: 'constexpr Point::Point(const Point&)'
   41 | class Point {
      |       ^~~~~
a.cc:41:7: note:   candidate expects 1 argument, 0 provided
a.cc:41:7: note: candidate: 'constexpr Point::Point(Point&&)'
a.cc:41:7: note:   candidate expects 1 argument, 0 provided
a.cc:59:40: error: no matching function for call to 'Point::Point()'
   59 |         public Line (Point a, Point b) {
      |                                        ^
a.cc:44:16: note: candidate: 'Point::Point(double, double)'
   44 |         public Point(double x, double y) {
      |                ^~~~~
a.cc:44:16: note:   candidate expects 2 arguments, 0 provided
a.cc:41:7: note: candidate: 'constexpr Point::Point(const Point&)'
   41 | class Point {
      |       ^~~~~
a.cc:41:7: note:   candidate expects 1 argument, 0 provided
a.cc:41:7: note: candidate: 'constexpr Point::Point(Point&&)'
a.cc:41:7: note:   candidate expects 1 argument, 0 provided