Solve problem 165