Riordan packed 368 shortbreads into large and small boxes. He filled each large box with 12 shortbreads and each small box with 8 shortbreads. All the boxes were full and no shortbreads were left over. What was the least number of boxes used by Riordan?