#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int A, B; cin >> A >> B; vector C; for (int i = 0; i < A + 1; i++) { for (int j = 0; j < B + 1; j++) { C.emplace_back(i + 5 * j); } } sort(C.begin(), C.end()); C.erase(unique(C.begin(), C.end()), C.end()); for (int x : C) { if (x == 0) continue; cout << x << '\n'; } return 0; }