n, m = map(int, input().split()) c1=0 c2=0 for i in range(n): for j in range(m): tem=min(n-i,m-j) c1+=tem c2+=(n-i)*(m-j)-tem print(c1,c2)