a = int(input("a = "))
b = int(input("b = "))
s=0
for i in range (a,b+1):
s=s+i*i
print("s =",s)
s = 0
a,b = int(input()), int(input())
for i in range(a,b+1):
s += i**2
print(s)
a = int(input("a = "))
b = int(input("b = "))
s=0
for i in range (a,b+1):
s=s+i*i
print("s =",s)
s = 0
a,b = int(input()), int(input())
for i in range(a,b+1):
s += i**2
print(s)