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