Like Kylie Minogue's megahit Can't Get You Out Of My Head, some tunes are so catchy they can drive you crazy.
But a freely available treatment exists for infuriating "earworms" which cause anxiety and distress for one in three people - the national anthem.
While Kylie may be pop royalty, her infectious ditty cannot compete with listening to a performance of God Save The Queen.
The patriotic song, written by 18th century composer Thomas Arne, is one of the most popular "cure tunes" used by people to rid themselves of maddening earworms, a study has found.
Others include the 1980s hit Karma Chameleon by Culture Club, and Happy Birthday.
Listening to a cure tune helps to block the endless looping cycle of a musical phrase that keeps repeating in the brain, scientists believe. The remedy was successful in one in 10 cases, according to a survey of more than 18,000 people.
Alternative strategies for exorcising earworms included immersing oneself in the offending song, engaging in conversation, watching TV, reading, praying, and even - bizarrely - sucking on a straw.
Psychologist Dr Lauren Stewart, from Goldsmith's, University of London, who led the research published in the online journal Public Library of Science One, said: " People differ in how they feel about their earworms - some love them, some of them are totally driven to distraction, and for others, it might be very dependent on the content and context of the earworm as to how they feel about them."
Earworms are highly prized by the popular music industry whose most valuable asset is the catchy song "hook". But for a third of us they are a genuine cause of anxiety and distress, say the researchers, who conducted the first study looking at how people deal with phenomenon in England and Finland.
More than 90 per cent of people are believed to have an earworm experience at least once a week. Rates of earworm affliction are even higher among musicians or those who see music as an important part of their lives, the scientists claim.
Can't Get You Out Of My Head, released in 2001, was one of the most successful pop songs of all time, topping the charts in the UK, Austria, Belgium, France, Germany, Italy and Switzerland as well as Minogue's native Australia. To date, more than five million copies of the record are said to have been sold around the world.
Last year the song was named the catchiest of all time in a poll of 700 people conducted as part of an investigation into what makes music memorable.
Dr Stewart said: "Some people reported having almost constant earworms, which is really annoying and can be very distracting.
"It might just be to do with how much attention you pay to your inner music. We found that whether or not you are an active musical listener is important. A negative response to an earworm will also make it persist. If you are a neurotic sort of person, that can prolong it."
Sucking a drink through a thin straw was the most surprising earworm solution cited by study participants.
But Dr Stewart said it might work because of the subtle connection between mouth movements, language and sounds played in the head.
"When you have an earworm you may not be singing it but you are only one step removed from singing, she said.
"Repetition of that tune in your head is, in a sense, movement related. Tying up the machinery of your mouth by sucking on a straw might help to block it."
Earworms are one of the subjects being explored during National Science & Engineering Week, organised by the British Science Association, which takes place from March 14.