It is one of life's most common irritations: the song you do not like that becomes stuck in your head.
Now scientists claim to have found a way to help anyone plagued by annoying tunes they cannot stop humming.
The best way to stop the phenomenon, sometimes known as earworms, is to solve anagrams, they say.
This can force the intrusive music out of your working memory, allowing it to be replaced by other, more amenable, thoughts.
But the researchers warn against trying anything too difficult because this can allow the melodies to wiggle their way back into your consciousness.
For those unwilling to carry around a book of anagrams, a good novel can do the trick.
''The key is to find something that will give the right level of challenge,'' said Ira Hyman, a music psychologist at Western Washington University who conducted the research.
''If you are cognitively engaged, it limits the ability of intrusive songs to enter your head ... If you are trying something too hard, then your brain will not be engaged successfully, so that music can come back. You need to find that bit in the middle where there is not much space left in the brain. That will be different for each individual.''
Hyman and his team conducted tests on volunteers to find out how tunes became stuck in the long-term memory.
By playing songs by the Beatles, Lady Gaga and Beyonce while they completed mazes drawn on pieces of paper, the researchers found they could get songs to play intrusively in participants' heads throughout the next day.
They then tested whether solving puzzles reduced the recurrence of the earworms.
They found that while Sudoku puzzles could help, if they were too difficult they had little effect. Anagrams were more successful and five-letter puzzles gave the best results.
Surveys have shown that a wide variety of songs become earworms. The team found Lady Gaga was the most common artist to get stuck in people's heads.
Alejandro - Lady Gaga
Bad Romance - Lady Gaga
Call Me Maybe - Carly Rae Jepsen
Single Ladies - Beyonce
She Loves You - The Beatles
I Wanna Hold Your Hand - The Beatles
SOS - Rihanna
You Belong With Me -Taylor Swift
Waterloo - ABBA
- Sydney Morning Herald