solution to project euler problem 11; ruby