Question: who wrote we can work it out by the beatles
Answer: `` We Can Work It Out '' is a song by the English rock band the Beatles , written by Paul McCartney and John Lennon .