#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define FOR(i,a,b) for(ll i=(a);i<(b);++i) #define ALL(v) (v).begin(), (v).end() #define p(s) cout<<(s)< void vprint(T &V){ for(auto v : V){ cout << v << " "; } cout << endl; } int main(){ cin.tie(0); ios::sync_with_stdio(false); // input ll A, B; cin >> A >> B; vector V; FOR(i, 0, A+1){ FOR(j, 0, B+1){ ll yen = 1 * i + 5 * j; V.push_back(yen); } } sort(ALL(V)); auto it = unique(ALL(V)); V.erase(it, V.end()); for(ll v : V){ if(v!=0){ p(v); } } return 0; }