sadomasochist (sadomasochism + -ist; agent_person)
A person who enjoys both inflicting and receiving pain for sexual gratification