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