Richard sold cupcakes and cookies yesterday. Each cupcake sold for $1.75 and each cookie sold for $0.75. At the end of the day, Richard had sold $49.25 worth of cookies and cupcakes. If he sold 35 cupcakes and cookies combined, how many cupcakes were sold and how many cookies were sold?