using System; using System.Collections.Generic; using System.Linq; class Program { static string InputPattern = "InputX"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("0.80000 0.50000"); //YES } else if (InputPattern == "Input2") { WillReturn.Add("0.60000 0.50000"); //NO } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); decimal[] wkArr = InputList[0].Split(' ').Select(X => decimal.Parse(X)).ToArray(); decimal p = wkArr[0]; decimal q = wkArr[1]; decimal P1 = (1 - p) * q; decimal P2 = p * (1 - q) * q; Console.WriteLine(P1 < P2 ? "YES" : "NO"); } }