NEW YORK -- The PBS series "Finding Your Roots" has discovered that political television's polar opposite Bills -- Maher and O'Reilly -- are distant cousins.

The revelation shocks the two men as it seems to tickle the show's host, Harvard University professor Henry Louis Gates Jr. The series, which had been put on hold following revelations that actor Ben Affleck sought to quash news that he had a slave-owning ancestor, begins its third season Jan. 5. The Maher-O'Reilly episode airs a week later.

The pugnacious Fox News Channel host is shown with the series-prepared book of his ancestry in front of him and is told he has a familial tie to another well-known personality.

Get Breaking News Delivered to Your Inbox

He turns a page to see a picture of Maher, the liberal host of HBO's "Real Time."

"Oh, geez," he said. "You're going to have to put him on 24-hour medical watch. This ruins his career. This destroys him."

Maher is more measured when he sees the O'Reilly picture in his book.

"It just shows you what a great place America is," he said. "Because we're about as opposite as you can possibly get."

The family ties go back - way back - and were discovered through DNA testing as opposed to a paper trail of a family tree.

Through testing of their Y chromosomes, which are passed through male family lines, both men share a common male ancestor from Kingdom of Breifne in Ireland, which was in place from the 13th through the 17th centuries, said CeCe Moore, the show's DNA consultant.

Separate autosomal DNA testing, which tracks descendants of both sexes, also indicates the men share an ancestor. This testing measures ties that date back about 500 years; the two tests could have spotted the same common ancestor found through the Y chromosome or perhaps they had more than one, she said.

"We're all connected if you go back far enough," Moore said. "These two are a little bit more recent than most of us."

Once the tie was discovered, "putting them in the same show became irresistible," Gates said. Journalist Soledad O'Brien, who discovered a distant connection to late-night talk show host Stephen Colbert, is also featured on the Jan. 12 episode.

The paper trail for both men uncovered interesting descendants. A Maher ancestor was a prominent New York union boss while the first O'Reilly to come to the U.S. escaped the Irish potato famine at age 16 to come to New York and open a saloon.

Maya Rudolph, Shonda Rhimes, Jimmy Kimmel, Sen. John McCain, Dustin Hoffman and Sean "Puffy" Combs are among the personalities whose backgrounds are traced in the upcoming "Finding Your Roots" season. The Affleck revelations, which forced a more rigorous and independent system on producers, did not scare away any potential subjects, Gates said.

"I really think this is our best season yet," he said.

In November, CBS News' "Sunday Morning" profiled Maher.

Maher's show is a frequent stop for A-list celebrities and politicians from both sides of the aisle, who -- without network censors -- can say whatever they want.

Maher is an outspoken liberal atheist, and if you've never heard him say something you might find offensive, just give him time.

"Does it bother you," Tracy Smith of "Sunday Morning" asked, "that there's a large chunk of America that doesn't like you?"

"Well, it's funny that you say that. I'm so aware of that, but it's a little like being the president. Everywhere the president goes, he's in the presidential bubble, and mostly what he sees are people who are breathlessly excited to see him. You don't see the hate on a day-to-day basis, and I don't either.

"In all the years I've been doing this, the number of times anyone has come up to me and stuck their finger in my face and said, 'You so-and-so, you're so wrong about this,' maybe twice. Now, in the age of social media, they do it anonymously. So, if I chose to read my Twitter feed every day, I could be very depressed!"

Instead he seems to be enjoying life as a confirmed bachelor. "When you're single, you just have to consult with yourself, and I'm always agreeing with me! 'What do you want to now, Bill?' 'I want to watch TV.' And maybe after 10 minutes I'll get bored with that and I'll start reading and I'll go back to TV. Maybe I'm just too spoiled in my autonomy. But that's how I was drawn."