#include <bits/stdc++.h>
using namespace std;
void slove(vector<int>& ret,int x){
if(x < 5){
ret[x]++;
return;
}
slove(ret,x/5);
slove(ret,x%5);
slove(ret,x/5);
}
int main() {
int x;
cin >> x;
vector<int> ret(5);
slove(ret,x);
for(auto val : ret) cout << val << " ";
return 0;
}

京公网安备 11010502036488号