# Beginning of solution to https://open.kattis.com/problems/sumkindofproblem P = int(input()) for i in range(0, P): line = input() L = line.split(' ') K = int(L[0]) N = int(L[1]) s = str(K) + ' ' + str(N*(N+1)//2) + ' and the other two formulae...' print(s)