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