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