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