#include<stdio.h>
  
int leap_year(int x);
  
  
int main(void)
{
    int start_year, end_year, counter;
    counter = 0;
    scanf("%d %d", &start_year, &end_year);
    for(int i = start_year; i =< end_year; i++){
        leap_year(i);
        counter += leap_year(i);
    } 
    if( counter = 0){
        printf("NA");
    }
    return 0;
}
  
  
int leap_year(int x)
{
    if(x % 4 = 0){
        printf("%d\n", x);
        return 1;
    }
    return 0;
} 