#include<iostream>
using namespace std;
int main()
{
int x , y = 0;
int arr[1000];
cin >> x >> y;
int j = 0;
for (int i=0;x <= y;x++)
{
if (x % 400 == 0)
{
arr[i] = x;
i++;
j++;
}
else if (x % 100 != 0 && x % 4 == 0)
{
arr[i] = x;
i++;
j++;
}
else { continue; }
}
cout << j << endl;
for (int q = 0;q < 1000;q++)
{ if (arr[q]>0)
cout << arr[q] << " ";
else { continue; }
}
}
望大佬们不吝赐教