#include<iostream>
using namespace std;
int main(){
	int a, b, i;
	bool flg, kaigyo=false;
	while(true){
		cin>>a>>b; if(a==0 && b==0) break;
		flg=false;
		if(kaigyo) cout<<endl;
		for(i=a;i<=b;i++){
			if(i%400 == 0){
				cout<<i<<endl;
				flg=true;
			}else if(i%100 == 0){
			}else if(i%4 == 0){
				cout<<i<<endl;
				flg=true;
			}
		}
		if(flg==false) cout<<"NA\n";
		kaigyo = true;
	}
	return 0;
}
### Prompt

Construct a Cpp code solution to the problem outlined:

Create a program that outputs all leap years between the year a and year b.

The leap year conditions are as follows. However, 0 <a ≤ b <3,000. If there is no leap year in the given period, output "NA".

* The year is divisible by 4.
* However, a year divisible by 100 is not a leap year.
* However, a year divisible by 400 is a leap year.



Input

Given multiple datasets. The format of each dataset is as follows:


a b


Input ends when both a and b are 0. The number of datasets does not exceed 50.

Output

Print the year or NA for each dataset.

Insert one blank line between the datasets.

Example

Input

2001 2010
2005 2005
2001 2010
0 0


Output

2004
2008

NA

2004
2008

### Response

```cpp
#include<iostream>
using namespace std;
int main(){
	int a, b, i;
	bool flg, kaigyo=false;
	while(true){
		cin>>a>>b; if(a==0 && b==0) break;
		flg=false;
		if(kaigyo) cout<<endl;
		for(i=a;i<=b;i++){
			if(i%400 == 0){
				cout<<i<<endl;
				flg=true;
			}else if(i%100 == 0){
			}else if(i%4 == 0){
				cout<<i<<endl;
				flg=true;
			}
		}
		if(flg==false) cout<<"NA\n";
		kaigyo = true;
	}
	return 0;
}
```