By Derrik J. LangLOS ANGELES -- Sandra Bullock and Melissa McCarthy brought The Heat against Channing Tatum and Jamie Foxx at the box office. The Fox ( FOX) action-comedy starring the funny ladies as mismatched detectives earned $40 million in second place in its opening weekend, topping the $25.7 million debut haul of Sony's ( SNE) White House Down, according to studio estimates Sunday. The Disney-Pixar ( DIS) animated prequel Monsters University remained box-office valedictorian in its second weekend, earning $46.1 million in first place. As for The Heat, employing two female leads to buck the male-dominated buddy-cop formula paid off in ticket sales. "I think the fact that we have a female-centric movie standing out in a forest of giant tent-pole movies is phenomenal," said Chris Aronson, Fox's president of domestic distribution. "Audiences really responded. We positioned this to be a female event movie, and we got the opening that we were hoping for this weekend." White House Down, which features Tatum as a wannabe Secret Service agent and Foxx as the president of the United States, was inaugurated below expectations in fourth place. The film's White House takeover plot is strikingly similar to FilmDistrict's Olympus Has Fallen, which opened in March and starred Gerard Butler and Aaron Eckhart. "It turned out to be a very competitive weekend," said Rory Bruer, Sony's president of worldwide distribution. "We had hoped White House Down did better, just from the standpoint that we love this film, but I feel very hopeful that with the July Fourth holiday coming up, it will be the perfect film for audiences, and it'll really add up for us." Meanwhile, Paramount's ( VIA) World War Z took another bite out of the box office in its second weekend domestically with $29.8 million. Overseas, the globe-trotting zombie thriller starring Brad Pitt cleared $70.1 million in 51 territories. "I think the variety of films is what brought people out to the movie theaters," said Paul Dergarabedian, an analyst for box-office tracker Hollywood.com. "There's a G-rated movie at the top of the chart and an R-rated movie in second place. That says a lot about the summer marketplace and how a unique slate of films can propel the box office."