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