"There's Something About Mary" is a supremely silly movie, which means that it has moments of boring idiocy mixed with moments of inspired hilarity. If you have a selective memory and choose when you leave the theater to remember only the hilarity, then you will probably think this a good movie.

But "Something," directed by "Dumb and Dumber" directors Peter and Bobby Farrelly, isn't good so much as it is effective. Like some strange amalgam of Blake Edwards and John Waters, that is, slapstick poured over haute kitsch, this story about thwarted love is part farce, part "Airplane!" and part high school bathroom jokes.

In fact, one of the first set pieces is a routine involving Ben Stiller. He plays Ted - a 16-year-old hopelessly in love with Mary (Cameron Diaz) - who gets his genitals painfully caught in his zipper in, of all places, Mary's mother's bathroom, just as he is about to take Mary to the prom.

At first the joke goes on far too long, but then suddenly it's the Marx Brothers stateroom scene from "Night at the Opera." First, a cop comes through the window and a fireman through the door. Then, all the neighbors are on the street watching as paramedics - adding insult to injury - drop Ted's stretcher before whisking him to the hospital for weeks of therapy. The Farrelly brothers wear you down so that what seems so lame at first truly becomes funny after a while.

The same goes for a sequence featuring Matt Dillon, playing Pat Healy, a sleazy detective trying to impress Mary. Ted hired him 13 years after that disastrous prom to find Mary, but now Pat is Ted's prime rival for her affections.

Pat is posing as an architect in order to win her. But a neighbor's dog's growl is a known barometer for losers, so Pat has secretly fed the dog a downer. When the pooch goes limp and Pat fears an overdose, his attempts to revive the animal are at first reminiscent of a bad TV skit. But by the time Pat is manipulating the sparks from a peeled electric wire to jump start the dog, the scene is indeed extremely funny.

The movie goes on in this vein for nearly two hours. The truth is that the Farrellys don't know how to tell a joke quickly. They don't know how to make a sketch funny from the start. They just beat you over the head until you laugh.

On the other hand, Stiller, who was great in "Flirting With Disaster," proves to be a fine physical comedian. The scene in which he wrestles with that same little dog is dazzling.

Dillon, who has always been a clunky actor, is at least game. He'll try anything and his willingness to be silly is good enough to work here. More memorable is Lee Evans - lately of "Mousehunt" and the brilliant co-star of

"Funny Bones." He plays another of Mary's hellbent admirers.

Diaz, with her wide grin and gangling limbs, makes Mary the eternal innocent, a smiling optimist. The Farrellys also cast Chris Elliott as Ted's best friend and Lin Shaye as Magda, as Mary's Ruth Gordon-like neighbor. They're both highly amusing.