A basketball and a pump cost $31. If the basketball costs three times as much as the pump, how much does each item cost?