A natural number is a perfect square as well as a perfect cube. Show that it is $0$ or $1$ $ ($mod $7$ $)$. A natural number is a perfect square as well as a perfect cube. Show that it is $0$ or $1$ $($mod $7$$)$. 
I tried the following.
There are integers numbers $x,y$ such that $n=x^{2}=y^{3}.$ By using Euclidean division, then $x$ and $y$ can be written as $7k,7k+1,7k+2,7k+3,7k+4,7k+5$ or $7k+6$. I am trying some contradictory stuff.
I don't know from where to go from here. Please suggest some hints.

So, $n$ has to be of the form $$z^{\text{lcm}(2,3)}$$  where $z$ is any integer
If $7|z$, then $z^6\equiv0\pmod7$
Else $7\nmid z\implies(7,z)=1$ using Fermat's little Theorem $z^{7-1}\equiv1$
