#include<stdio.h>
#include<math.h>
int main(void) {
int year = 2000;
int count = 0;
for (int i = year; i < 2500; i++) {
if (i % 4 == 0 && i % 100 != 0) {
printf("%d ", i);
count++;
}
if (i % 400 == 0)
{
printf("%d ", i);
count++;
}
if (count == 5) {
printf("\n");
count = 0;
}
}
}