An eighth grade class was divided into two groups to go to the state fair. The students in the first group bought 9 food tickets and 14 ride tickets for $66.50 total. The students in the second group bought 18 food tickets and 14 ride tickets for $98.00 total. What was the cost of each food ticket and each ride ticket.