//自己留着复习用
#include<stdio.h>
int s(int a)
{
if (a%2==0)
return aa;
else
return aa*a;}
int main ()
{int i,m,n,s1,s2;
scanf("%d %d",&m,&n);s1=s2=0;
for(i=m;i<=n;++i)
{
if(i%2==0)
s1=s1+s(i);
else s2=s2+s(i);}
printf("%d %d",s1,s2);
return 0;
}