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