Jessie J has Miley Cyrus to thank for keeping a roof over her head, because co-writing her hit song Party In The U.S.A. paid the British singer's rent for more than three years.

The Bang Bang hitmaker helped to pen Cyrus' 2009 smash and admits she spent years living off the royalty payments she received for her work.

Jessie J tells Britain's Glamour magazine, "You've got to write songs; that's where the money is, being an artist. Party In The U.S.A. paid my rent for, like, three years. Actually it was way longer than that. That's where I get most of my money. I write songs."