Proving one way is very simple
If n is a perfect square then
n = $a^2$
$n^7$ = $a^{14}$
$n^7$ = $a^7$($a^7$) which is obviously a perfect square for some integer a.
It's the if $n^7$ is a perfect square then n is a perfect square part that is giving me trouble. I have already tried to get hints from others and the one hint I was given was to write $n^7$ as a product of primes, but I have no clue where to go from there. I believe it can be done using modulus but I honestly have no idea.
Any hints would help thanks.