Determine the gcd of all numbers of the form

$$
(b-a)(c-b)(d-c)(d-a)(c-a)(d-b)
$$

where $a, b, c, d$ range over $\mathbb{Z}$.

## Bézout's Theorem and Euclidean Algorithm
Let $D$ be the gcd of all these numbers.

If we take $a=0, b=1, c=2$ and $d=3$, the product is

$$
1 \cdot 1 \cdot 1 \cdot 3 \cdot 2 \cdot 2=12
$$

Therefore, by the definition of gcd, $D \mid 12$.

Now let's check that 12 divides all numbers of this form. Let $a, b, c, d$ be four integers, and $n$ the corresponding product. By the pigeonhole principle, two of the numbers among $a, b, c$ and $d$ are congruent modulo 3. Therefore, their difference is divisible by 3. In particular, $3 \mid n$.

Now, let's look at modulo 2. Either three of the numbers among $a, b, c$ and $d$ have the same parity, or two of the numbers are even and the other two are odd. In the first case, say for example it is $a, b$ and $c$. Then $b-a$ and $c-a$ are divisible by 2, so $4 \mid n$. In the second case, we can say without loss of generality that $a$ and $b$ are even and $c$ and $d$ are odd. In this case, $b-a$ and $d-c$ are divisible by 2, so $4 \mid n$.

In all cases, $3 \mid n$ and $4 \mid n$. Since 3 and 4 are coprime, $12=3 \cdot 4 \mid n$. Finally, 12 divides each of the products, and 12 is one of the products, so $D=12$.