Language: Java

import java.util.Scanner;

public class Main{
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNextDouble()){
			double x1 = sc.nextDouble();
			double y1 = sc.nextDouble();
			double x2 = sc.nextDouble();
			double y2 = sc.nextDouble();
			double x3 = sc.nextDouble();
			double y3 = sc.nextDouble();
			double xp = sc.nextDouble();
			double yp = sc.nextDouble();
			
			Point p1 = new Point(x1, y1);
			Point p2 = new Point(x2, y2);
			Point p3 = new Point(x3, y3);
			Point pp = new Point(xp, yp);
					
			Triangle t = new Triangle(p1, p2, p3);
			
			if(t.isInThisTriangle(pp)) System.out.println("YES");
			else System.out.println("NO");
		}
		sc.close();
	}
	
}

class Line{
	
	double p;
	double q;
	double r;
	
	/**
	 * ??´???px+qy=r??????????????????
	 * 
	 * @param p
	 * @param q
	 * @param r
	 */
	Line(double p, double q, double r){
		this.p = p;
		this.q = q;
		this.r = r;
	}
	
	public Line(Point p1, Point p2){
		this(p1.getX() - p2.getX(), p1.getY() - p2.getY(), (p1.getX() == p2
				.getX()) ? (p1.getY() - (p1.getY() - p2.getY())
				/ (p1.getX() - p2.getX()) * p1.getX()): 0);
	}
	
	/**
	 * ????????´???????????????2????????????????????´????????????????????????????????????
	 * 
	 * @param x
	 * @param y
	 * @return 2???x, y???????????´???????????°true
	 */
	boolean isTheSameSide(Point x, Point y){
		double result = this.calcPX_QY(x.getX(), x.getY())
				* this.calcPX_QY(y.getX(), y.getY());
		return (result > 0) ? true: false;
	}
	
	/**
	 * ???????????????x, y????????????px+qy????¨?????????????
	 * 
	 * @param x
	 * @param y
	 * @return
	 */
	double calcPX_QY(double x, double y){
		return x * p + y * q;
	}
}

class Triangle{
	
	Point p1;
	Point p2;
	Point p3;
	
	Triangle(Point p1, Point p2, Point p3){
		this.p1 = p1;
		this.p2 = p2;
		this.p3 = p3;
	}
	
	Point getCenter(){
		return new Point((p1.getX() + p2.getX() + p3.getX()) / 3, (p1.getY()
				+ p2.getY() + p3.getY()) / 3);
	}
	
	boolean isInThisTriangle(Point p) {
		Line l12 = new Line(p1, p2);
		Line l23 = new Line(p2, p3);
		Line l31 = new Line(p3, p1);
		Point center = this.getCenter();
		
		return l12.isTheSameSide(p, center) && l23.isTheSameSide(p, center) && l31.isTheSameSide(p, center);
	}
}

Compiler output:
Main.java:51: error: cannot find symbol
	public Line(Point p1, Point p2){
	            ^
  symbol:   class Point
  location: class Line
Main.java:51: error: cannot find symbol
	public Line(Point p1, Point p2){
	                      ^
  symbol:   class Point
  location: class Line
Main.java:64: error: cannot find symbol
	boolean isTheSameSide(Point x, Point y){
	                      ^
  symbol:   class Point
  location: class Line
Main.java:64: error: cannot find symbol
	boolean isTheSameSide(Point x, Point y){
	                               ^
  symbol:   class Point
  location: class Line
Main.java:84: error: cannot find symbol
	Point p1;
	^
  symbol:   class Point
  location: class Triangle
Main.java:85: error: cannot find symbol
	Point p2;
	^
  symbol:   class Point
  location: class Triangle
Main.java:86: error: cannot find symbol
	Point p3;
	^
  symbol:   class Point
  location: class Triangle
Main.java:88: error: cannot find symbol
	Triangle(Point p1, Point p2, Point p3){
	         ^
  symbol:   class Point
  location: class Triangle
Main.java:88: error: cannot find symbol
	Triangle(Point p1, Point p2, Point p3){
	                   ^
  symbol:   class Point
  location: class Triangle
Main.java:88: error: cannot find symbol
	Triangle(Point p1, Point p2, Point p3){
	                             ^
  symbol:   class Point
  location: class Triangle
Main.java:94: error: cannot find symbol
	Point getCenter(){
	^
  symbol:   class Point
  location: class Triangle
Main.java:99: error: cannot find symbol
	boolean isInThisTriangle(Point p) {
	                         ^
  symbol:   class Point
  location: class Triangle
Main.java:17: error: cannot find symbol
			Point p1 = new Point(x1, y1);
			^
  symbol:   class Point
  location: class Main
Main.java:17: error: cannot find symbol
			Point p1 = new Point(x1, y1);
			               ^
  symbol:   class Point
  location: class Main
Main.java:18: error: cannot find symbol
			Point p2 = new Point(x2, y2);
			^
  symbol:   class Point
  location: class Main
Main.java:18: error: cannot find symbol
			Point p2 = new Point(x2, y2);
			               ^
  symbol:   class Point
  location: class Main
Main.java:19: error: cannot find symbol
			Point p3 = new Point(x3, y3);
			^
  symbol:   class Point
  location: class Main
Main.java:19: error: cannot find symbol
			Point p3 = new Point(x3, y3);
			               ^
  symbol:   class Point
  location: class Main
Main.java:20: error: cannot find symbol
			Point pp = new Point(xp, yp);
			^
  symbol:   class Point
  location: class Main
Main.java:20: error: cannot find symbol
			Point pp = new Point(xp, yp);
			               ^
  symbol:   class Point
  location: class Main
Main.java:95: error: cannot find symbol
		return new Point((p1.getX() + p2.getX() + p3.getX()) / 3, (p1.getY()
		           ^
  symbol:   class Point
  location: class Triangle
Main.java:103: error: cannot find symbol
		Point center = this.getCenter();
		^
  symbol:   class Point
  location: class Triangle
22 errors