Solve Problem 0002 and 0004