import std.algorithm;
import std.bigint;
import std.bitmanip;
import std.concurrency;
import std.container;
import std.conv;
import std.functional;
import std.format;
import std.math;
import std.meta;
import std.numeric;
import std.random;
import std.range;
import std.stdio;
import std.string;
import std.traits;
import std.typecons;


immutable string YES = "YES";
immutable string NO = "NO";


auto solve(long X) {
    return [7, 5, 3].canFind(X);
}


void main() {
    auto input = stdin.byLine.map!split.joiner;

    long X;
    X = input.front.to!long;
    input.popFront;

    static if (is(ReturnType!solve == void))
        solve(X);
    else {
        auto ans = solve(X);

        static if (isFloatingPoint!(ReturnType!solve))
            writeln(format("%.9f", ans));
        else static if (is(ReturnType!solve == bool))
            writeln(ans ? YES : NO);
        else
            writeln(ans);
    }
}
