Britney Spears and Demi Lovato, two singing sensations who have weathered personal and professional ups and downs in the unforgiving public eye, are about to do some judging of their own on The X Factor.

The former Disney stars are set to be the new judges on the reality music competition helmed by Simon Cowell of American Idol fame. They will join Cowell and music guru L.A. Reid in spotting new talent.

I'm so excited about the whole experience, Spears said of her new gig, according to a CBS report. It's going to be so much fun and different from anything I've ever done. I'm ready to find the true star.

Spears and Lovato, who both hit it big via the Disney route -- Spears was a Mouseketeer and Lovato starred in the Camp Rock movies and the television show Sonny With a Chance -- hail from vastly different eras in music history (think CDs and cassettes versus iTunes, for one thing). On a more personal level, they have one major thing in common: famously troubled pasts.

Spears had a very public emotional and professional breakdown that started in 2006 with her split from ex-husband Kevin Federline. Highlights included shaving her head, losing custody of her two children to Federline, and bombing her performance at the 2007 MTV Video Music Awards. The media coverage rivaled that of Lindsay Lohan, and things got so out of hand that her father was made conservator over her legal affairs and assets in 2008, according to an Associated Press report.

The pop diva slowly climbed out of her battles. Her work during that troubled time period included the aptly-titled album Circus and a cameo on How I Met Your Mother, playing a receptionist who was in love with Josh Radnor's character.

She got engaged to her former agent, Jason Trawick, last year. Trawick was made Spears' dad's co-conservator last month, which means he joins her father in helping Spears manage certain aspects of her personal life, while her dad continues to handle her finances, the AP reported.

Lovato's personal problems included self-harm, anorexia and bulimia. The problems came into public view when she sought treatment after hitting a backup dancer.

Lovato has been very vocal about her struggles and her desire to get better. This has included maintaining a curvier frame. The singer told talk show host Ellen DeGeneres that she wants to set a healthy body image example for young girls and is adamant about not overworking herself. To that effect, she even decided to leave her starring role in the Disney show Sonny With a Chance.

I don't think going back to Sonny would be healthy for my recovery, Lovato told People magazine in 2011. Being in front of a camera would make me nervous.

Now Lovato and Spears will join Cowell and Reid in the never-ending quest to find new talent. There's no telling yet whether they may be considered the nice judges -- particularly next to Cowell's more acerbic comments -- but they did manage to sell many a record and survive the pitfalls and pressures that come with fame. They might have a thing or two to say.