Or, a balance between intelligence and wild laughter:
Monty Python and the Holy Grail
What About Bob? (a bit silly but funny too)
There’s Something About Mary (the dog on fire scene is precious)
The Pink Panther (first one by Steve Martin; the second was a disaster)
The Hangover (not so bright, but funny–Hangover II is a disaster)
Beverly Hills Cop
I also find the first few episodes of “Californication” to be smart and funny.
And “Fawlty Towers.”
What are your candidates for intelligent comedies?