Calculate pythagoras and check if a number has decimal places
Calculate perimeter that maximises solution