#include <iostream>
using namespace std;
int main() {
    int n;
    cin >> n;
    if (n % 3 == 1 || n % 2 == 0) {
        cout << "Y" << endl;
    } else {
        cout << "N" << endl;
    }
    return 0;
}
/**************************************************************
	Problem: 1673
	User: fuhoubin
	Language: C++
	Result: Wrong Answer
****************************************************************/