import java.util.Scanner;
public class P2241 {
static int T,n,m;
static Long a,b;//a正方形个数,b长方形个数。
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
m = sc.nextInt();
a = 0l;
b = 0l;
for(int i=1;i<=n;i++) {
for(int j=1;j<=m;j++) {
a += Math.min(i, j);
b += i*j;
}
}
System.out.println(a+" "+(b-a));
}
}