Ankur Kayal's submission of Factor Tree | CodeChef