import java.io.*; import java.util.*; public class Main_yukicoder680_1 { private static Scanner sc; private static Printer pr; private static void solve() { int n = sc.nextInt(); for (int m = (0x1 << 30) - 1; n > 2 && m > 0; m /= 2) { if (n >= m) { n -= m; } } if (n == 0 || n == 1) { pr.println("YES"); } else if (n >= 2) { pr.println("NO"); } } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes())); pr = new Printer(System.out); solve(); // pr.close(); pr.flush(); // sc.close(); } static String INPUT = null; private static class Printer extends PrintWriter { Printer(OutputStream out) { super(out); } } }