There are 6 baskets on the table. Each basket has 9, 7, 8, 16, 1 and 17 apples. Liam chose second, Sean chose first, Emma chose sixth, John chose fifth, Matt chose fourth, and Olivia chose third. How many apples did John and Matt choose in total?