The Wizard of Oz
The segment, "If I Only Had A Brain", is based on the song title of the same name from the musical The Wizard Of Oz. Mr. Burns actually hums a few bars of the song as he's scooping out Homer's brain. Also, Mr. Burns' line, "You clinking, clattering, cacophony of colligenous cogs and camshifts!" is from The Wizard of Oz.