Solve Problem#29
Solve Problem#30