Over-the counter painkillers like aspirin, ibuprofen, and naproxen, might protect against skin cancer, a new study suggests.

For the study, researchers analyzed medical records of some 200,000 people from Denmark and found that people who took painkillers were almost 15 times less likely to develop skin cancer.

"We hope that the potential cancer-protective effect of NSAIDs will inspire more research on skin cancer prevention. Also, this potential cancer-protective effect should be taken into account when discussing benefits and harms of NSAID use," said Sigrún Alba Jóhannesdóttir of Aarhus University Hospital in Denmark and lead author of the study.

Recent reports have suggested that young adults are at increased risk of developing skin cancer due to unsafe tanning methods. Experts say that any kind of tanning is bad for health. In the U.S., cost of skin cancer is soaring, roughly about $1.7 billion in treatment and about $3.8 billion as loss of productivity, according to the reports.

Nonsteroidal anti-inflammatory drugs or NSAIDs have been found to be somewhat effective in decreasing risk of few types of cancer.

However, these drugs aren't an answer to skin cancer.

"There is mounting evidence that aspirin does reduce the risk of some cancers, but it's too soon to say if this includes skin cancer. Aspirin can have serious side effects - so it's important to talk to a doctor about the risks and benefits if you're thinking of taking it regularly," Hazel Nunn of Cancer Research UK told BBC. She added that a combination of shades, clothes and sunscreen can help reduce chances of developing skin cancer.

The Centers for Disease Control and Prevention says that skin cancer is the most common form of cancer in U.S. In 2008 nearly 60,000 people were diagnosed with melanomas of skin and almost 9,000 people died from the cancer.

The study is published in the journal Cancer.