At a snack bar, hot dogs cost $3.50 and hamburgers cost $5.00. If the snack bar sold 27 snacks and made $118.50 in revenue, how many hot dogs were sold? How many hamburgers?