solve prob-9 ybh