Note that there is always a prime which divides only once - namely the greatest prime less than . Because suppose , where is the greatest prime less than . Then because is the next multiple of after itself. But by Bertrand's postulate, there is a prime with , contradicting the maximality of .

Your method would not work, because for instance is rational although none of the three factors are...

There may be a way without using the relatively heavy machinery which is Bertrand's postulate, but I doubt it.