import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int y=scanner.nextInt();
YearTest st1 = new YearTest();//实例化
st1.dataYear(y); //调用方法
}
}
class YearTest {
private int y;
public void dataYear(int y) { //方法
this.y = y;
if((y%4==4)&&(y%100!=0)||(y%400==0)){//判断年份
System.out.println("L");
}
else
System.out.println("N");
}
}