def difference(n) : S = (n*(n + 1))//2; res = S*(S-1); return res;