Imran makes a toy from a rectangular wooden frame ABCD, with AB = 12 cm and AD = 7 cm. A bead X can slide along the side AD, and a bead Y can slide along the side BC. A rubber band is stretched straight between the two beads.

(i) What is the shortest length the rubber band can have? Where are the beads then?
(ii) Where should the beads be for the rubber band to be as long as possible? Along which line does the band lie then?
