Mary's school is selling tickets to the annual dance competition. On the first day of ticket sales the school sold 5 adults tickets and 2 student tickets for a total of $33. The school took in $39 on the second day by selling 1 adult ticket and 4 student tickets. How many student tickets did the school sell on the third day if the school sold 9 adult tickets and collected $117?