The greatest common divisor of two integers is (x+8) and their least common multiple is x(x+8), where x is a positive integer. If one of the integers is 40, what is the smallest possible value of the other one?

x + 8 = 40

x =32

x(x + 8) =32(32 + 8) =1280 - the 2nd smallest number.

LCM(1280, 40) =1280

GCD(1280, 40) = 40