import math

a = int(input())
b = int(input())
c = int(math.sqrt((a-b)**2))
if c==1:
    print("1")
else:
    midPoint = c//2
    print(midPoint)
    friend1 = 0
    friend2 = 0
    for i in range(1, midPoint+1):
        friend1 = friend1+i
    print(friend1)
    k=1
    for j in range(min(a,b)+midPoint, max(a,b)):
        friend2 = friend2+k
        k+=1
    print(friend2)
    print(friend1+friend2)