(作者偷懒中)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b=0;cin>>a;
for(int x=0;x<=a;x++){
for(int j=0;j<=a;j++){
for(int i=a;i>=0;i--){
if(i+2*j+5*x==a){
b+=1;
printf("%03d%12d%12d%12d\n",b,i,j,x);
}
}
}
}
return 0;
}