import std.stdio;
import std.conv;
import std.array;

void main(){
    string x = readln.split[0];
    if (x == "3" || x == "5" || x == "7"){
        writeln("YES");
    }else{
        writeln("NO");
    }
}