Valid Inequalities for Mixed-Integer Linear and Mixed-Integer Conic Programs