A 40 ft board is cut into two pieces so that one piece is 8 ft longer than the other piece. Find the length of the two pieces