@r9m So, are the possible values for $y$ the following??
$$y^2=1, 3^2, 2^2, 2^2 \cdot 3^2, 2^4, 2^4 \cdot 3^2, 2^6, 2^6 \cdot 3^2$$
$$ \Rightarrow y=\pm 1 , \pm 3, \pm 2, \pm 2 \cdot 3, \pm 2^2 , \pm 2^2 \cdot 3 , \pm 2^3, \pm 2^3 \cdot 3 \\ \Rightarrow y=\pm 1 , \pm 3, \pm 2, \pm 6, \pm 4 , \pm 12 , \pm 8, \pm 24 $$