Ian Watkins took part in the writing of the song , I Knew You Were Trouble .
The song was co-written by Ian Watkins , Max Martin and Shellback and produced by Martin and Shellback .
I Knew You Were Trouble