### instruction:
If you are a doctor, please answer the medical questions based on the patient's description.

### input:
Hamstring pain. Can I take ibuprofin for the pain? I know how to stretch the hamstring, I know several stretches. Will a heat pack help? How long will the hamstring take to heal? I felt the pain about 4 weeks ago but still entered the Mothers Day Classic 8k run on 11 May. I did some running, mostly walked. The pain was less when I was running than walking.

### output:

Hi, I had gone through your question and understand your concerns. Muscle tightness is because its over-lengthened, stretching will not resolve the problem because its already over-stretched, stretching will most likely irritate the muscle further. Problem lies in the opposing muscle group. You can do this for prevention or treatment: Stretch or roll your qua Chat Doctor. Stretch your hamstrings by lying on your back, NOT by standing up and trying to touch your toes. Strengthening core especially abdominal muscles. Try incorporating planks into your routine. Strengthen hamstring muscles with leg curls. Use no weight or a very light weight at first. Ice the site immediately after any exercise for 15 to 20 minutes. Also try wearing compression shorts to help support the affected muscles. Massage Therapy can help by relaxing tight muscles, improving flexibility, and restoring joint range of motion.  Visit your physician if the pain is persistent, if you are limping or altering your gait in any way, and especially if you notice any bruising. Physical Therapy can help to heal and work on correcting any muscle weaknesses or imbalances. Hope this answers your question. If you have additional questions or follow-up questions then please do not hesitate in writing to us and voting. I will be happy to answer your questions.