import std.stdio, std.string, std.conv;
import std.typecons;
import std.algorithm, std.array, std.range, std.container;
 
void main() {
	auto X = readln.split[0].to!int;
	writeln(X == 7 || X == 5 || X == 3 ? "YES" : "NO");
}
