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 their teacher would get.
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.
7 30
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.


Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue