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