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