2021 AIME II Problem 11

A teacher was leading a class of four perfectly logical students. The teacher chose a set S of four integers and gave a different number in S to each student. Then the teacher announced to the class that the numbers in S were four consecutive two-digit positive integers, that some number in S was divisible by 6 , and a different number in S was divisible by 7 . The teacher then asked if any of the students could deduce what S is, but in unison, all of the students replied no. However, upon hearing that all four students replied no, each student was able to determine the elements of S. Find the sum of all possible values of the greatest element of S.