import sys a, b = map(int, input().split()) assert 0 <= a <= 100, 'a does not follow the limitation' assert 0 <= b <= 100, 'b does not follow the limitation' assert a != 0 or b != 0, 'both a and b are zeros' s = [0 for _ in range(1000)] for i in range(a+1): for j in range(b+1): s[i+5*j] = 1 for i in range(1, len(s)): if s[i]: print(i)