using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static long NN => long.Parse(ReadLine()); static long[] NList => ReadLine().Split().Select(long.Parse).ToArray(); public static void Main() { Solve(); } static void Solve() { var s = NN; for (var i = 1_000_000L; i < 2_000_000; ++i) { if (i * i % 1_000_000 == s) { WriteLine("Yes"); return; } } WriteLine("No"); } }