#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int a, b; cin >> a >> b; set s; REP(i, a + 1) REP(j, b + 1) s.insert(i + 5 * j); for (const auto &i: s) if (i != 0) cout << i << endl; return 0; }