res1=0 #偶数计数器 res2=0 #奇数计数器 n,m=input().split() n=int(n) m=int(m) for i in range(n,m+1): if i%2==0: #偶数 res1+=i else: res2+=i print(res1,res2)