//
#include<bits/stdc++.h>
using namespace std;
#define is_leap(y) ( ( y%4==0 && y%100 ) || ( y%100==0 && y%400==0 ) )
int main()
{
int y;
while( cin>>y )
{
if( is_leap(y) ) cout<<"L"<<endl;
else cout<<"N"<<endl;
}
return 0;
}