Let a1,a2,⋯,an be pairwise distinct positive integers satisfying a1+a2+⋯+a, where n is an integer greater than 1. Let d be the greatest common divisor of a1,a2,⋯,an. For all possible values of n and a1,a2,⋯,an that satisfy the above conditions, find the maximum value of nd.