#include using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int a, b; cin >> a >> b; set s; for (int i = 0; i <= a; ++i) for (int j = 0; j <= b; ++j) s.insert(i + j * 5); s.erase(0); stringstream ss; for (const auto& it : s) ss << it << "\n"; cout << ss.str(); return 0; }