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