A bakery sells two kinds of baked goods: cookies and pie slices. A cookie costs 12 ani a pe sites $4. In one day, the store sold 34 baked goods for a total of $114. How many cookies die itey sele? How many pie slices did they sell? Write a system of equations and solve.