#include #define show(x) cout << #x << " = " << x << endl using namespace std; using ll = long long; using pii = pair; using vi = vector; template ostream& operator<<(ostream& os, const vector& v) { os << "sz=" << v.size() << "\n["; for (const auto& p : v) { os << p << ","; } os << "]\n"; return os; } template ostream& operator<<(ostream& os, const pair& p) { os << "(" << p.first << "," << p.second << ")"; return os; } constexpr ll MOD = 1e9 + 7; template constexpr T INF = numeric_limits::max() / 100; int main() { set st; int a, b; cin >> a >> b; for (int i = 0; i <= a; i++) { for (int j = 0; j <= b; j++) { const int t = i + j * 5; if (st.find(t) == st.end()) { st.insert(t); } } } for (const int p : st) { if (p == 0) { continue; } cout << p << endl; } return 0; }