Arrange the numbers 1,2,3,⋯ ,371,2,3, \cdots, 371,2,3,⋯,37 in a sequence a1,a2,⋯ ,a37a_{1}, a_{2}, \cdots, a_{37}a, where and , such that is divisible by for . Find and .