using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static void Main() { Solve(); } static void Solve() { var n = ReadLine().Split(' '); var set = new HashSet(n); var list = new List(set); var dic = new Dictionary(); for (var i = 0; i < list.Count; ++i) dic[list[i]] = i; var cmp = new int[n.Length]; for (var i = 0; i < n.Length; ++i) cmp[i] = dic[n[i]]; var bitmax = 1 << list.Count; for (var b = 0; b < bitmax; ++b) { var map = new bool[list.Count]; var tmp = b; for (var i = 0; i < map.Length; ++i) { map[i] = tmp % 2 == 1; tmp >>= 1; } if (Nand(Nand(Nand(map[cmp[0]], map[cmp[1]]), map[cmp[2]]), Nand(Nand(map[cmp[3]], map[cmp[4]]), map[cmp[5]]))) { WriteLine("YES"); return; } } WriteLine("NO"); } static bool Nand(bool a, bool b) { return !(a & b); } }