#include using namespace std; #define FOR(i,l,r) for(int i = (int) (l);i < (int) (r);i++) template bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; } template bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; } typedef long long ll; int N,M; int main() { cin >> N >> M; set st; FOR(i,0,N + 1) FOR(j,0,M + 1){ st.insert(i + j * 5); } for(const auto& it : st){ if(it == 0) continue; printf("%d\n",it); } return 0; }