using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = long.Parse(ReadLine()); WriteLine(new List { 6, 28, 496, 8128, 33550336, 8589869056, 137438691328, 2305843008139952128 }.Contains(n) ? "Yes" : "No" ); } }