Ratio of the number of students in art class to the number of students in gym class was 2:7, however art class is small, and gym class is large, students changed for the second semester. Now the students in art class to the number students in gym class is 5:4. If 75 students are in art class in second semester, how many were in art class and gym class first semester?