A community center sells a total of 297 tickets for a basketball game. An adult ticket costs ​$3. A student ticket costs ​$1. The sponsors collect ​$ 487 in ticket sales. Find the number of each type of ticket sold.