A group of children was crossing a river in boats. When they tried to sit 6 people per boat there was no place left for 4 of them. When they tried to sit 8 people per boat they had one empty boat. How many students and how many boats were there?