using System; using System.IO; using System.Linq; using System.Text; using System.Collections.Generic; using System.Diagnostics; using System.Numerics; using Enu = System.Linq.Enumerable; class Program { public void Solve() { var vec = Enu.Range(0, 5).Select(i => new Vector2D(Reader.Int(), Reader.Int())).ToList(); if (ConvexHull(vec).Count == 5) Console.WriteLine("YES"); else Console.WriteLine("NO"); } List ConvexHull(List Ps) { Ps.Sort(); var res = new List(); for (int i = 0; i < Ps.Count; i++) { while (res.Count > 1 && (res[res.Count - 1] - res[res.Count - 2]).Det(Ps[i] - res[res.Count - 1]) <= 0) res.RemoveAt(res.Count - 1); res.Add(Ps[i]); } for (int i = Ps.Count - 2, t = res.Count; i >= 0; i--) { while (res.Count > t && (res[res.Count - 1] - res[res.Count - 2]).Det(Ps[i] - res[res.Count - 1]) <= 0) res.RemoveAt(res.Count - 1); res.Add(Ps[i]); } res.RemoveAt(res.Count - 1); return res; } struct Vector2D : IEquatable, IComparable { public long X, Y; public Vector2D(long x, long y) { X = x; Y = y; } public static Vector2D operator +(Vector2D a, Vector2D b) { return new Vector2D(a.X + b.X, a.Y + b.Y); } public static Vector2D operator -(Vector2D a, Vector2D b) { return new Vector2D(a.X - b.X, a.Y - b.Y); } public long DistSquare(Vector2D b) { return (X - b.X) * (X - b.X) + (Y - b.Y) * (Y - b.Y); } public double Dist(Vector2D b) { return Math.Sqrt(DistSquare(b)); } public long InnerProduct(Vector2D b) { return X * b.X + Y * b.Y; } public long Det(Vector2D b) { return X * b.Y - Y * b.X; } public override int GetHashCode() { return (int)(X * 10007 + Y); } public bool Equals(Vector2D b) { return X == b.X && Y == b.Y; } public int CompareTo(Vector2D b) { return X != b.X ? Math.Sign(X - b.X) : Math.Sign(Y - b.Y); } } } class Entry { static void Main() { new Program().Solve(); } } class Reader { private static TextReader reader = Console.In; private static readonly char[] separator = { ' ' }; private static readonly StringSplitOptions op = StringSplitOptions.RemoveEmptyEntries; private static string[] A = new string[0]; private static int i; private static void Init() { A = new string[0]; } public static void Set(TextReader r) { reader = r; Init(); } public static void Set(string file) { reader = new StreamReader(file); Init(); } public static bool HasNext() { return CheckNext(); } public static string String() { return Next(); } public static int Int() { return int.Parse(Next()); } public static long Long() { return long.Parse(Next()); } public static double Double() { return double.Parse(Next()); } public static int[] IntLine() { return Array.ConvertAll(Split(Line()), int.Parse); } public static int[] IntArray(int N) { return Enu.Range(0, N).Select(i => Int()).ToArray(); } public static int[][] IntTable(int H) { return Enu.Range(0, H).Select(i => IntLine()).ToArray(); } public static string[] StringArray(int N) { return Enu.Range(0, N).Select(i => Line()).ToArray(); } public static string Line() { return reader.ReadLine().Trim(); } private static string[] Split(string s) { return s.Split(separator, op); } private static string Next() { CheckNext(); return A[i++]; } private static bool CheckNext() { if (i < A.Length) return true; string line = reader.ReadLine(); if (line == null) return false; if (line == "") return CheckNext(); A = Split(line); i = 0; return true; } }