How effective are medications like beta-blockers or ACE inhibitors after a myocardial infarction?

How effective are medications such as beta-blockers or ACE inhibitors in improving outcomes and preventing complications after a myocardial infarction, and what are their specific benefits and potential risks for patients?