Tickets for an Amtrak train cost $17 for children and $36 for adults. Josie paid $2,297 for a total of 77 tickets. How many children tickets and how many adult tickets did Josie buy?