Dividing a Piece of Wood in a Given Ratio