parseInput input = map read $ words input :: [Int]

solve x | x == 5 = "YES"
		| x == 7 = "YES"
		| x == 3 = "YES"
		| otherwise = "NO"

main = do
	input <- getLine
	let [k] = parseInput input
	print $ solve k
	
