You are thinking along the right lines, but we won't need to go in that direction. If you like the x*y thing, you can stop at the second to last line, set each factor equal to 1, and solve for n. None will work.
1 is not considered a prime number last I checked. And so, in light of this, no cube can be prime. How do we know this?