cpp
#include
using namespace std;
int x, y, ans, i;
int kunkun(int x, int y) {
for ( i = x; i <= y; i++) {
if ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0) {
ans++;
}
}
cout << ans << endl;
}
int ikun(int x, int y) {
for ( i = x; i <= y; i++) {
if ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0) {
cout << i << " ";
}
}
}
int main() {
cin >> x >> y;
kunkun(x, y);
ikun(x, y);
return 0;
}