from heapq import heappush, heappop, heapify from collections import defaultdict, deque,Counter from math import ceil, floor, sqrt, factorial, gcd, cos, sin, pi, acos, asin from itertools import permutations, combinations, product, accumulate from bisect import bisect_left, bisect_right, insort from copy import deepcopy from fractions import Fraction from random import randint import sys from functools import cache,lru_cache #@lru_cache(maxsize=None) from time import time from sortedcontainers import SortedSet, SortedList, SortedDict # type: ignore sys.setrecursionlimit(10**7) vector1 = [[0, -1], [1, 0], [0, 1], [-1, 0]] vector2 = [[0, 1], [1, 0], [-1, 0], [0, -1], [1,-1], [-1, 1], [1, 1], [-1, -1]] alphabet = "abcdefghijklmnopqrstuvwxyz" def prime_factorial(n): p = [] i = 2 while i * i <= n: while n%i == 0: p.append(i) n = n // i i += 1 if n != 1: p.append(n) return p def main(): N = int(input()) C = defaultdict(int) if N < 3: print("No") exit() for i in range(2,N+1): p = prime_factorial(pow(2,i)-1) for x in p: C[x] += 1 c = Counter(prime_factorial(pow(2,N+1)-1)) for key in c.keys(): if c[key] > C[key]: print("No") exit() print("Yes") if __name__ == '__main__': main()