Students and apples 1

There are s students in the class and they have a apples. They would like to split the apples among each other as equally as possible. So, they divide the apples among each other and gift the rest to their teacher. We would like to know how many apples are there going to be for each student and how many would get their teacher.
The first line of the input contains the number of students s. The second line contains the number of apples a. Print the number of apples per student and the number of apples the teacher would get after division in the output.

4 2
Explanation: There are 7 students and 30 apples. In case of equal division, students would get the following amount of apples: 4 4 4 4 4 4 4 and would leave the remaining 2 apples to their teacher.
To check your solution you need to sign in
Sign in to continue