solution to the Fair and Square code jam problem.