# -*- coding: utf-8 -*- a, b = map(int, input().split()) temp = [] for i in range(b+1): for j in range(a+1): temp.append(j*1 + i*5) tmp = list(set(temp)) tmp.sort() for x in tmp: if x != 0: print(x)