import sys input = sys.stdin.readline N = int(input()) dp = [0] * (N + 1) dp[1] = 1 for i in range(N): if i + 3 <= N: dp[i + 3] |= dp[i] if i * 2 <= N: dp[i * 2] |= dp[i] if dp[-1]: print("YES") else: print("NO")