#include<iostream> using namespace std; bool run(int n){ if(n%4==0&&(n%400==0||n%100!=0)){ return 1; } else{ return 0; } } int main() { int x,y; cin>>x>>y; int S=0; for(int i=x;i<=y;i++){ if(run(i)==1){ S++; } } cout<<S<<endl; for(int i=x;i<=y;i++){ if(run(i)==1){ cout<<i<<" "; } } return 0; }