well you have pretty much already done it.

Write out the prime factorization of c, then square it and you have a bunch of primes to even powers. Now since and factorization is unique, the factors have to be distributed among a and b. a and b cannot share any of the prime factors or else they would not be relatively prime since that prime would divide both of them. Thus each a and b is a product of even powered prime numbers, making them perfect squares.