#include "bits/stdc++.h" using namespace std; int main() { int A, B; cin >> A >> B; vector V; for (int i = 0; i <= A; i++) { for (int j = 0; j <= B; j++) { V.push_back(i + j * 5); } } sort(V.begin(), V.end()); V.erase(unique(V.begin(), V.end()), V.end()); for (int i = 1; i < V.size(); i++) cout << V[i] << endl; }