solve prob-7 ybh