solve prob-5 ybh