Input will always be in new line?

Hi , whether input will be a list or elements in new line? Not sure what’s wrong with this solution?

l=[int(i) for i in input().split()]
sum=0
for i in l:
    sum=sum+i
    if sum<0:
        break
    else:
        print(i)