def main(): A,B = map(int,input().split()) ans = set() for i in range(A + 1): for j in range(B + 1): ans.add(i + 5*j) ans.remove(0) for k in sorted(ans): print(k) if __name__=="__main__": main()