#include using namespace std; #define REPF(i,a,n) for(int i=a;i<(int)(n);i++) #define REP(i,n) REPF(i,0,n) #define ALL(c) begin(a),end(a); #define RALL(c) rbegin(a),rend(a); #define SZ(c) (int)(c.size()) int main() { int a,b; cin>>a>>b; set ans; REP(i,a+1) { REP(j,b+1) { ans.insert(i+j*5); } } for(auto x:ans) { if(x==0) continue; cout<