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