N = int(input()) N += 1 tbl = [0] * N for i in range(2, N): if tbl[i] == 0: for j in range(i * 2, N, i): tbl[j] = -1 judge = 'NO' for i in range(len(tbl)): if tbl[i] == -1: if N % i == 0: judge = 'YES' break print(judge)