n, m = input().split() n, m = int(n), int(m) s1 = 0 s2 = 0 i = n while i <= m: if i % 2 == 1: s1 = s1 + i else: s2 = s2 + i i = i + 1 print(s2, s1)