Some questions about euler function.

Say I am given some number n.

I can not find out what the euler function of n is unless I can find some prime p where p^k=n

So say I am given some n. How can I find out if there is some prime p that p^k=n?

EDIT:

ok I just took the prime factorization of n kind of trial and error.

I was able to represent it as (p^a)(q^b)(r^c) where p q r are all primes.

then I just used inclusion exclusion principle. Pretty sure I got the answer right