Analgesics are a class of drugs that are primarily used to relieve pain. They work by blocking or reducing the…