import java.util.Scanner;

public class K {
	/*
	public static long factorial(int n){
		long total = 1;
		for (int i = 2; i <= n; i++){
			total *= i;
		}
		return total;
	}
	*/
	
	public static long choose3(int n){
		return ((n+2)*(n+1)*n / 6);
	}
	public static void main (String [] args){
		Scanner scan = new Scanner (System.in);
		
		int tests = scan.nextInt();
		for (int i = 0; i < tests; i++){
			int n = scan.nextInt();
			System.out.println(i + 1 + ": " + n + " " + choose3(n));
		}
		scan.close();
	}
}