It’s one of the biggest reasons that startups fail, says Shahab Kaviani, the co-creator of CoFoundersLab.

“More than the ability to raise money, more than the marketability of the product, more than the logo or the name of the company…” he says.

It’s also the second-most important relationship of your life. “You know, your life partner being the first,” says Shahab.

So what is it? Cofounder relationships.

Shahab says that this story is all too common: A guy quit his job to launch a business with a friend. But several weeks later, they realized that they weren’t a good match and had to dissolve the company. “Now this entrepreneur not only didn’t get a chance to work on the startup of his dreams, but he also lost a paying job, so he’s back on the market,” he says.

So how do you avoid a situation like that? By finding the right partners. “In a day where 80% of the startups are going to fail…you invest the time and make sure that you’re making the right choice,” he says.

In his Mixergy course, Shahab walks you through that process. Here are three highlights from the course.

1. Handle the Pie Situation

When slicing up the ownership pie, how much should each cofounder get?

“50/50 is usually not the right answer,” says Shahab.

And the right answer will probably change several times as you build, launch, and grow the company. For instance, maybe one you have to take time off for a family situation. Or maybe your partner can’t afford to quit her day job just yet.

“One could be spending, you know, 30-40 hours, the other one’s only spending 10 or 15,” says Shahab. ”And then a year from now, that could be totally switched.”

So how do you break up equity?

Re-slice the pie

Redistribute equity on a regular basis.

Shahab recommends regularly readjusting your ownership “based on things like how much time you’re actually putting in, what you’re delivering, what assets you bring to the table, whether it’s relationships, or money, or other teammates or suppliers,” he says.

He also recommends scheduling assessments on a regular basis. “Maybe quarterly, but I think bi-annually is good,” he says.

2. Make Them Prove They’re Worthy

In some ways, you want a cofounder to be just like you.

“If I want to build a lifestyle business or you want to build a highly scaling venture-backed company…we want to make sure that we’re kind of going for the same sort of league of companies,” says Shahab.

But in other ways, you need to be different. For instance, if you know a lot about finance, you might look for a cofounder “who can help manage people,” he says. “They don’t need to know a lot about finance.”

So how do you make sure your cofounder has the right skills?

Get specific, then get proof

Make a written list of their skills, then ask them to prove each one.

“Having the discipline to really get specific on skills on a spreadsheet…is good, because there are claims that are made,” says Shahab.

For instance, he says that a few months after striking up a partnership, it became clear that this one cofounder “wasn’t really great at some of the things that the other cofounder was looking for,” he says.

That’s why you also have to ask for validation, such as “experiences that demonstrate that they’re really good at those skills,” says Shahab.

3. Get a Prenup

Ideally, you and your cofounder will see eye-to-eye.

But “startups are so unpredictable,” says Shahab. “We should just be prepared for a way to make healthy and informed decisions so it’s not under-the-gun, where emotions are really high.”

For example, what if you got an unsolicited buyout? “One founder is maybe earlier in their career, and maybe $200,000 in their pocket would be great and they would just sell, and the other one is really trying to build something really big and build something really lasting,” says Shahab.

So how do you plan for the unpredictable?

Decide how to handle disagreements

Talk about how you’ll make decisions when there’s a conflict.

“Talk through all the different scenarios that we hope never happen, almost like a prenuptial, and decide how we’re going to make that decision,” says Shahab. “We don’t have to decide now how we’re going to come down on that decision, but let’s just agree on how we’re going to make that decision.”

So in the example of the unsolicited buyout, you could have an agreement about what number you’ll accept if it happens in the first two years. “Or if not that, you can at least agree on what the protocol for that decision-making is going to be,” says Shahab. “You want to have some of those conversations early on and avoid the contention that could come without being prepared ahead of time.”

Written by April Dykman. Production notes by Jeremy Weisz.