Self-made billionaires Warren Buffett and Leon Cooperman are two of the most successful investors of all time, and they both agree that luck is the single most important factor when it comes to investing.

Buffett, the founder and CEO of Berkshire Hathaway who is worth nearly $87 billion dollars, says he won the lottery while still in the womb.

Per a recent article by CNBC:

“The womb from which you emerge determines your fate to an enormous degree for most of the seven billion people in the world,” Buffett told journalist Rebecca Jarvis in 2013. “Just in my own case: I was born in 1930, I had two sisters that have every bit the intelligence that I had, have every bit the drive, but they didn’t have the same opportunities.”

In short, “if I had been a female, my life would have been entirely different.”

Buffett has made similar points before about winning the “ovarian lottery.”

“You don’t know whether you’re going to be born black or white. You don’t know whether you’re going to be born male or female,” he explained. “You don’t know whether you’re going to be born infirm or able-bodied. You don’t know whether you’re going to be born in the United States or Afghanistan.”

The ovarian lottery is “the most important event in which you’ll ever participate,” Buffett continued. “It’s going to determine way more than what school you go to, how hard you work, all kinds of things.”

Cooperman, the founder and CEO of Omega Investors who is worth about $3.2 billion, is the son of Polish immigrants and the first from his family to attend college. Cooperman also attributes much of his success to simply being lucky, but luck isn’t all you need, he said.

“Whatever success I’ve achieved, I think I’ve achieved it because I’ve been very lucky.” He added that common sense and a strong work ethic have also contributed to his fortune.