using System; using System.Collections.Generic; using System.Linq; using System.Numerics; namespace yukicoder { public class Program { public static void Main() { var n = long.Parse(Console.ReadLine()); var m = (long)Math.Sqrt(n * 2); if (m * (m + 1) == n * 2) { Console.WriteLine("YES"); Console.WriteLine(m); } else { Console.WriteLine("NO"); } } } }