#include using namespace std; int main() { 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); } } for (int x : S) { if (x != 0) cout << x << endl; } }