If purchased before the game, tickets to a high school baseball game cost $1.00. If purchased at the gate, the tickets cost $1.50. For a particular game, 500 tickets were sold and the total receipts were $587.50. How many tickets were purchased before the game and how many tickets were purchased at the gate?