Worked greatest product from grid problem