WASHINGTON – Generally speaking, after someone threatens to file a lawsuit against you, it's hard to make the relationship work going forward. That's pretty much the situation in which President Barack Obama and House Speaker John Boehner find themselves. Two days after the midterms, the tensions between them were on display.

Congressional leaders and Obama, who are scheduled to sit down face-to-face on Friday, spent Wednesday and Thursday communicating through press conferences -- and not warmly. Obama announced he will move forward on immigration reform. "If he acts alone, he will poison the well," Boehner said the next day. Then he switched metaphors for a second warning: "If you play with matches, you take the risk of burning yourself."  

But Boehner, too, has confrontational items on his agenda, like trying yet again to quash the president's signature health care legislation. “The House I’m sure at some point next year will move to repeal Obamacare," Boehner said. "Whether that can pass the Senate, I don’t know.” 

The two men have been at a standoff for nearly two years. In July, Boehner even threatened to file a lawsuit against the president, charging him with overstepping his authority in making changes to the Affordable Care Act.

But with the GOP taking control of the Senate, they have a fresh incentive to cooperate. They need each other in order to accomplish anything substantive, and if the government doesn't work, both men will get the blame.

“The American people made it clear Election Day, they want to get things done,” Boehner said.

"My job is not get along with the president just to get along with him, although we actually have a nice relationship," Boehner said on Thursday. "The fact is, my job is to listen to my members and listen to the American people and make their priorities our priorities." 

But the need to listen to his conservative members -- in order to hang onto his job as speaker -- doesn't leave Boehner with much room to maneuver. Obama has sometimes sounded almost sympathetic to the speaker's dilemma. 

"These days, House Republicans give John Boehner a harder time than they give me, which means orange really is the new black," Obama said at the White House Correspondents Dinner last May, referring to the speaker's tan. 

In their long history, Boehner and Obama have both walked away from negotiations feeling burned.

Twice, the men set out to try to strike a deal to address the nation’s debt – the elusive “grand bargain.” In July 2011, with an impending debt ceiling deadline, Boehner and Obama tried to find an agreement that would cut spending, address taxes and raise the debt ceiling. It was always going to be tough to get it through the Republican-controlled House, where conservatives who had swept into office with the tea party wave were eager to show their new power. 

Negotiations -- and an Obama-Boehner golf outing -- led to a proposed deal, but ultimately produced little more than months of public sparring over which side was to blame for the failure.

After Obama was re-elected in 2012, there were signs that both sides might be ready to cooperate. The nation was barreling toward the “fiscal cliff,” with its deep, across-the-board cuts.

So Boehner and Obama tried again. A second chance at a grand bargain, a deal that would have raised taxes on the highest earners, reduced spending and raised the debt ceiling. Boehner took a version of the deal, known as Plan B, to his members -- who rejected it. A few weeks later, a handful of conservatives tried to oust him as speaker. 

Boehner, stung, told Republican House members that he would no longer negotiate one-on-one with the president. And he stuck to it.

When another fiscal crisis hit in September 2013, there were no good-faith negotiations between the House and the White House, and with no funding, the government shut down. The standoff lasted 16 days until Senate leaders finally reached an agreement.

Each failed round of talks chilled the relationship further, and the two men certainly didn't sound warm this week. But the structure of government locks them into a relationship. They might as well find a way to make it work.