How to reduce a triplet of integers into a triplet of pair-wise coprime integers?

28 Views Asked by At

A pair of integers $(x,y)$ can be reduced to a pair of coprime integers via $(x_1,y_1) = \left(\frac{x}{d},\frac{y}{d}\right)$ where $d = gcd(x,y).$ Suppose we have a triplet of integers $(x,y,z)$ and we want to reduce it to $(x_1,y_1,z_1)$ such that $gcd(x_1,y_1) = gcd(x_2,y_2) = gcd(x_3,y_3) = 1.$ For $d' = gcd(x,y,z),$ we not that $(x_1,y_1,z_1) = \left(\frac{x}{d'},\frac{y}{d'},\frac{z}{d'}\right)$ will not work, e.g. $(2,4,8).$ How to achieve this?