unittest
{
	assert( [ "5" ].parse.expand.solve == "YES" );
	assert( [ "6" ].parse.expand.solve == "NO" );
}



import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto x = input.front.strip.to!( long );
	return tuple( x );
}

auto solve( long x )
{
	return ( x == 7 || x == 5 || x == 3 ) ? "YES" : "NO";
}
