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