Square root of a specific matrix in M(3,Z) over Z Let 
$ \begin{bmatrix} 
a&b&c \\
d&e&f\\
g&h&i\\ \end{bmatrix}^2 = \begin{bmatrix}
x&0&0\\
0&0&-y\\
0&1&-z\\ \end{bmatrix}
$
Where all of the components are integer.
I am trying to figure out what will be the condition of $a,b,c,d,e,f,g,h,i$ or $x,y z$. so that the equation is true. 
I mean
For example, a diagonal integer matrix has a square root over $\mathbb{Z}$ if the diagonal entries are perfect square. 
Something like that condition.
I'd tried to solve it by a system of equation, but its VERY hard because, its solving $9$ equations. And I cant do it. 
What I just showed that 
$$y = -\frac{f}{h}$$
and 
$$cdh = bgf.$$
And thats all. Im stuck. 
My question is, is their any other way, or other approach to solve this ?
Pls help me with this. 

We consider the equation $X^2=diag(x,U)$ where $U=\begin{pmatrix}0&-y\\1&-z\end{pmatrix}$. 
We assume that $x$ is not an eigenvalue of $U$, that is $xz+x^2+y \not= 0$. Since $X$ commute with $diag(x,U)$, $ X$ has the form $diag(e,Y)$ where $e^2=x$ and $Y^2=U$.
Then $x$ is a square and $y=\det(U)$ too. 
It remains to study the equation $Y^2=U$ which has solutions as, for example,
$Y=\pm \begin{pmatrix}2&-4\\1&-1\end{pmatrix}$ and $U=\begin{pmatrix}0&-4\\1&-3\end{pmatrix}$.
EDIT. Let $Y=\begin{pmatrix}a&b\\c&d\end{pmatrix}$. I think that, necessarily, $c=\pm1$ -but I am not sure-; then we may assume $c=1$. In this condition, the solutions in $Y$ are in the form 
$Y=\begin{pmatrix}\epsilon v&-v^2\\1&1-\epsilon v\end{pmatrix}$.
