N = int(input()) if pow(2, N-1) % N == 1 or N == 2: print("NO") else: print("YES")