#include <iostream>
#include <cstdlib>
using namespace std;

bool is_leap(int year);

int main()
{
	for (int year {1890}; year <= 1910; ++year) {
		cout << year << " ";
		if (is_leap(year)) {
			cout << "L";   //leap year
		} else {
			cout << "N";   //non-leap year
		}
		cout << "\n";
	}

	return EXIT_SUCCESS;
}

//Return true if year is a leap year, false otherwise.

bool is_leap(int year)
{
	if (year % 400 == 0) {   //a year such as 1600 or 2000
		return true;
	}

	if (year % 100 == 0) {   //a year such as 1800 or 1900
		return false;
	}

	if (year % 4 == 0) {     //a year such as 2020 or 2024
		return true;
	}

	return false;            //a year such as 2025 or 2026
}