Brent´s solution is perfect and full of important details.
I would like to add some comments, related to dangerous situations usually explored in traps for the uncautious students...
\[{x^2}\,\,{\text{even}}\,\,\,\,{\text{does}}\,\,{\text{NOT}}\,\,{\text{imply}}\,\,\,\,\,x\,\,{\text{even}}\,\,\,\,\,\,\,{\text{ }}\left( {x = \sqrt 2 \,\,\,{\text{for}}\,\,{\text{example}}} \right)\]
\[{y^2}\,\,{\text{odd}}\,\,\,\,{\text{does}}\,\,{\text{NOT}}\,\,{\text{imply}}\,\,\,\,\,y\,\,{\text{odd}}\,\,\,\,\,\,\,{\text{ }}\left( {y = \sqrt 3 \,\,\,{\text{for}}\,\,{\text{example}}} \right)\]
On the other hand, as it is the case in the problem proposed,
\[x\,\,\,\operatorname{int} \,,\,\,\,{x^2}\,\,{\text{even}}\,\,\,\,{\text{imply}}\,\,\,\,\,\,x\,\,{\text{even}}\,\,\,\,\,\,\,{\text{ }}\left( {x\,\,{\text{is}}\,\,{\text{odd}}\,\,{\text{or}}\,\,{\text{even,}}\,\,{\text{but}}\,\,\,{\text{it}}\,\,{\text{is}}\,\,{\text{not}}\,\,{\text{odd}}...} \right)\]
\[y\,\,\,\operatorname{int} \,,\,\,\,{y^2}\,\,{\text{odd}}\,\,\,\,{\text{imply}}\,\,\,\,\,\,y\,\,{\text{odd}}\,\,\,\,\,\,\,{\text{ }}\left( {y\,\,{\text{is}}\,\,{\text{odd}}\,\,{\text{or}}\,\,{\text{even,}}\,\,{\text{but}}\,\,\,{\text{it}}\,\,{\text{is}}\,\,{\text{not}}\,\,{\text{even}}...} \right)\]
This kind of observation follows the notations and rationale taught in the GMATH method.
Regards,
Fabio.