#include<iostream>
//#include<cmath>
using namespace std;
int main()
{
double x,y;
int n1,n2;
while( cin >> n1 >> n2 )
{
x = y = 0.0;
if( n1 > n2)
{
swap(n1,n2);
}
for ( int i = n1;i <= n2;i ++)
{
if(i % 2 == 0)
{
x += i*i;
}
else
{
y += i*i*i;
}
}
cout << x <<" " << y << endl;
}
system("pause");
}