Tickets for a certain show cost $17, $21, or, for VIP seats, $40. If ten times as many $17 tickets were sold as VIP tic
kets, and the number of $17 tickets sold was 57 more than the sum of the number of $21 tickets and VIP tickets, sales of all three kinds of tickets would total $51 comma 471. How many of each kind of ticket would have been sold?