The table shows the number of groups that some classes were divided into and the number of pencils that were given to each of them. If every group in a given class received an equal number of pencils, what would be the value of A, B, C, and D?
ClassNumber of pencilsNumber of groupsNumber of pencils received by each groupGrade 160A5Grade 2B1112Grade 31368CGrade 490D5