#include<iostream>
using namespace std;
int main()
{
int x,y,i,t;
while(cin>>x>>y)
{
if(x>y)
{
t=x;
x=y;
y=t;
}
long int m=0,n=0;
for(i=x;i<=y;i++)
{
if(i%2==0)m=m+i*i;
else n=n+i*i*i;
}
cout<<m<<" "<<n<<endl;
}
return 0;
}
using namespace std;
int main()
{
int x,y,i,t;
while(cin>>x>>y)
{
if(x>y)
{
t=x;
x=y;
y=t;
}
long int m=0,n=0;
for(i=x;i<=y;i++)
{
if(i%2==0)m=m+i*i;
else n=n+i*i*i;
}
cout<<m<<" "<<n<<endl;
}
return 0;
}