#include using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); int a,b; cin>>a>>b; vectorv((a+1)*(b+1)); for(int one=0;one<=a;++one){ for(int five=0;five<=b;++five){ v.at(one*(b+1)+five)=one+five*5; } } sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end()); for(auto i=v.begin()+1;i!=v.end();++i)cout<<*i<<"\n"s; }