I am writing another program after the success of my first one. In this program, with the idea from a friend, I am creating a Pythagorean Theorem solver, where you can enter in 2 of the 3 sides and it gives you the missing side. However, he also requested if it can give a simplified square root formula of the equation also. So my question is, if you have something like (square root) of 27, is there a command that can check if it can be divided by a perfect square (4,9,16, ect.) and then give the perfect square and the other number that it multiplies by? Then it can output (square root) 9 * 3 and give a finalized 3*(square root) 3?