Suppose that there are two types of tickets to a show: advance and same day. Advance tickets cost $40 and same day tickets cost $35. For one performance, there were 45 tickets sold in all, and a total amount paid for them was $1700. How many tickets of each type were sold?