def main(): ab = list(map(int, input().split())) A = ab[0] B = ab[1] ra = [] for x in range(1, A + 1): ra.append(x) rb = [] for x in range(1, B + 1): rb.append(x * 5) rab = [] for x in range(len(ra)): for y in range(len(rb)): rab.append(ra[x] + rb[y]) rab.extend(ra) rab.extend(rb) rab.sort() rab = list(set(rab)) for x in range(len(rab)): print(rab[x]) if __name__ == "__main__": main()