#include<stdio.h>

void leap_year(int)


int main(void)
{
    int start_year, end_year, check;
    check = 0;
    scanf(%d %d,&start_year, &end_year);
    for(int i = start_year; i =<end_year; i++){
        leap_year(i);
        check += leap_year(i);
    } 
    if(check = 0){
        printf("NA");
    }
    return 0;
}


int leap_year(int = x)
{
    if(x % 4 = 0){
        printf("%d\n", x);
        return 1;
    }
    return 0;
} 