Given integers a and b in the format a√b (a on the square root of b), make a program that will reduce b and increase a until the radical statement is fully simplified.
Example
input
a = 1
b = 16
output
4 root 1
In this instance, 1√16 = 4√1
Bonus - 25 chars for the ability to simplify radicals other than square root using another variable, c.