Problem #PRU-87967

Problem

In Neverland, there are magic laws of nature, one of which reads: “A magic carpet will fly only when it has a rectangular shape.” Frosty the Snowman had a magic carpet measuring \(9 \times 12\). One day, the Grinch crept up and cut off a small rug of size \(1 \times 8\) from this carpet. Frosty was very upset and wanted to cut off another \(1 \times 4\) piece to make a rectangle of \(8 \times 12\), but the Wise Owl suggested that he act differently. Instead he cut the carpet into three parts, of which a square magic carpet with a size of \(10 \times 10\) could be sown with magic threads. Can you guess how the Wise Owl restructured the ruined carpet?