f=open("vaipsis.txt", encoding="utf-8") K, L, P=[int(jupp) for jupp in f.readline().strip().split(" ")] for nr in range(K): N, S, E, W =[int(jupp) for jupp in f.readline().strip().split(" ")] print((L-E-W)*(P-N-S))