An adult ticket to an amusement park costs $18 more than a child ticket. The adult ticket cost less than $25. A tour agency bought 4 times as many adult tickets as child tickets. It paid $3960 more for the adult tickets than child tickets. How many tickets did the tour agency buy?