#include <stdio.h>
int main(){int a, b, m , n, t;
while( scanf("%d %d", &a, &b) != EOF ){if( a > b )
{t = a;
a = b; b = t;}
m = n = 0; for( ; a <= b; a ++ ) { if( a % 2 == 0 ) m += a * a; else n += a * a * a; } printf("%d %d\n", m, n);}
return 0;}
//对于输入有特殊情况:a > bac过了,但与别人的结果比较,觉得应该有更简短的代码