In this paper, we present an identity involving the greatest common divisors of almost all possible subproducts of $n$ nonzero integers. Then we prove this identity, with the help of the fundamental theorem of arithmetic, and an identity concerning the minimum function $\min$. As a consequence, a new formula for the least common multiple is derived.