a,b=map(int,input().split()) s=set() for i in range(a+1): for j in range(b+1): a=i+5*j s.add(a) s.remove(0) s.sorted() for i in s: print(i)