Question: "State of Grace" and "I knew You Were Trouble" were both off of Taylor Swift's "Red" album, which song was written by Swift, Max Martin and Shellback?

full_context: Document 1: Back to December: "Back to December" is a song written and recorded by American singer/songwriter Taylor Swift for her third studio album "Speak Now" (2010). The song was sent to country radio in the United States on November 15, 2010, as the second single from "Speak Now". According to Swift, "Back to December" is the first time she ever apologizes to someone in a song. Critics speculate that the song is about Taylor Lautner, Swift's ex-boyfriend, which was later acknowledged by Lautner. "Back to December" is considered an orchestral country pop ballad and its lyrics are a remorseful plea for forgiveness for breaking up with a former lover.
Document 2: The Red Tour: The Red Tour was the third concert tour by American singer-songwriter Taylor Swift. Launched in support of Swift's fourth studio album, "Red" (2012), the tour began on March 13, 2013 in Omaha, Nebraska and concluded on June 12, 2014 in Singapore.
Document 3: We Are Never Ever Getting Back Together: "We Are Never Ever Getting Back Together" is a song recorded by American singer-songwriter Taylor Swift for her fourth studio album, "Red" (2012). Swift co-wrote the song with its producers, Max Martin and Shellback. The song was released as the lead single from "Red" on August 13, 2012, by Big Machine Records. Its lyrics depict Swift's frustrations at an ex-lover who wants to re-kindle their relationship. "Rolling Stone" magazine named the song the second best song of 2012 while it took the fourth spot in "Time"' s end-of-year poll. It has received a Grammy Award nomination for Record of the Year. It also received a People's Choice Awards nomination for Favorite Song of the Year.
Document 4: Speak Now: Speak Now is the third studio album by American singer-songwriter Taylor Swift. It was released on October 25, 2010, by Big Machine Records. Production for the album took place during 2009 to 2010 at several recording studios, and was handled by Swift and Nathan Chapman. Written entirely by Swift as the follow-up to "Fearless", "Speak Now" expands on the country pop style of her previous work, and features lyrical themes including love, romance and heartbreak.
Document 5: Red (Taylor Swift album): Red is the fourth studio album by American singer-songwriter Taylor Swift. It was released on October 22, 2012, by Big Machine Records, as the follow-up to her third studio album, "Speak Now". The album title was inspired by the "semi-toxic relationships" that Swift experienced during the process of conceiving this album, which Swift described the emotions she felt as "red emotions" due to their intense and tumultuous nature. "Red" touches on Swift's signature themes of love and heartbreak, however, from a more mature perspective while exploring other themes such as fame and the pressure of being in the limelight. The album features collaborations with producers and guest artists such as Gary Lightbody of Snow Patrol and Ed Sheeran and is noted for Swift's experimentation with new musical genres. Swift completed The Red Tour in support of the album on June 12, 2014, which became the highest-grossing tour of all time by a country artist, grossing over $150 million.
Document 6: Songs of Innocence (U2 album): Songs of Innocence is the thirteenth studio album by Irish rock band U2. Released on 9 September 2014, it was produced by Danger Mouse, with additional production from Paul Epworth, Ryan Tedder, Declan Gaffney, and Flood. The album was announced at an Apple Inc. product launch event and released the same day to all iTunes Store customers at no cost. It was exclusive to iTunes, iTunes Radio, and Beats Music until 13 October 2014, when it received a physical release on Island and Interscope Records. The digital release made the record available to over 500 million iTunes customers, for what Apple CEO Tim Cook marketed as "the largest album release of all time".
Document 7: Red (Taylor Swift song): "Red" is a song recorded by American singer-songwriter Taylor Swift for her fourth studio album of the same name (2012). It was released on October 2, 2012, in the US by Big Machine Records as the second promotional single from "Red" in 2012 and serves as the album's fifth single on June 21, 2013. It was part of the tracks released during the four weeks preceding the release of the album. Musically, "Red" is a country song, and its lyrics uses colors and metaphors to describe an intense and tumultuous relationship.
Document 8: 22 (Taylor Swift song): "22" is a song recorded by American singer-songwriter Taylor Swift for her fourth album, "Red" (2012). It was written by Swift along with Max Martin and Shellback. The song was released as the album's fourth single on March 12, 2013. The lyrics describe the joys of being 22 years old.
Document 9: All Too Well: "All Too Well" is a song recorded by American singer-songwriter Taylor Swift. It was written by Swift and Liz Rose. It appears on Swift's fourth studio album, "Red" (2012). The song received universal acclaim from music critics and was performed at the 2014 Grammy Awards.
Document 10: State of Grace (Taylor Swift song): "State of Grace" is a song by American singer-songwriter Taylor Swift from her fourth studio album "Red" (2012). It was released to the iTunes Store on October 16, 2012, in the United States by Big Machine Records as the fourth and final promotional single from the album. It was the only promotional single from the album that was not re-issued as an official single, as "Begin Again", "Red", and "I Knew You Were Trouble", were all later re-issued as official singles. The song was written by Swift and produced by Nathan Chapman and Swift. Musically, the song is a departure from Swift's typical country pop, using influences of alternative rock while being compared to bands such as U2, Muse and The Cranberries. The song has received immense praise from music critics, who have complimented its broader sound in comparison with Swift's previous material.
Document 11: Out of the Woods (song): "Out of the Woods" is a song by American singer-songwriter Taylor Swift. The song was written and produced by Swift and Jack Antonoff of fun.. It was the second song to be officially released from her fifth studio album "1989", serving as the first promotional single on October 14, 2014. It is the fourth track on the album, after "Style". "Out of the Woods" serves as the sixth official single with an accompanying music video that premiered on December 31, 2015, during "Dick Clark's New Year's Rockin' Eve" on ABC. It was released to radio on February 5, 2016. The song went number one in Israel and has reached the top 10 in Belgium, Canada, and New Zealand as well as the top 20 in Australia and the United States.
Document 12: Begin Again (Taylor Swift song): "Begin Again" is a song written and recorded by American singer-songwriter Taylor Swift for her fourth studio album, "Red" (2012). Swift co-produced the song with Nathan Chapman and Dann Huff. Initially released as a promotional single on September 25, 2012 by Big Machine Records, the song served as the second single from "Red" on October 1, 2012. "Begin Again" is a country song, with the lyrical content finds Swift falling in love again after a failed relationship.
Document 13: You're Not Sorry: "You're Not Sorry" is a country rock song performed by American singer-songwriter Taylor Swift. The song was solely written by Swift and produced by Nathan Chapman with Swift's aid. It was released on October 28, 2008 by Big Machine Records as a promotional single from Swift's second studio album, "Fearless" on iTunes, though it is no longer available. A remix version for the television episode of "" in which Swift made an appearance was later released. Swift wrote "You're Not Sorry", inspired by an ex-boyfriend who was revealed to be opposite of what he appeared to be. The song is a power ballad with country and rock music influences.
Document 14: 1989 (Taylor Swift album): 1989 is the fifth studio album by American singer-songwriter Taylor Swift released on October 27, 2014, through Big Machine Records. Swift began composing the album following release of previous studio effort, "Red" (2012). Over the course of the two-year songwriting period, she collaborated with producers Max Martin and Shellback—Martin served as the album's executive producer alongside Swift. The album's title was named after the singer's birth year and inspired by the pop music of the 1980s.
Document 15: I Knew You Were Trouble: "I Knew You Were Trouble" is a song recorded by American singer-songwriter Taylor Swift for her fourth studio album, "Red" (2012). It was released on October 9, 2012, in the United States by Big Machine Records as the third promotional single from the album. Later, "I Knew You Were Trouble" was released as the third single from "Red" on November 27, 2012, in the United States. It was written by Swift, Max Martin and Shellback, with the production handled by the latter two.
ground_truth: I Knew You Were Trouble