Young Programmers
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
It is known that the school not less than k[1]
students, but not more than k[2]
учеников. students. Also know that every boy be friends n
girls, each girl with m
boys. What is the minimum number of students can be in school and how school boys and girls?
Young programmers, as you can see, still solve this puzzle. Help them.
Input
The first line of the input file is 4 numbers separated by spaces: k[1]
, k[2]
, n
and m
. All input data are natural numbers not exceeding 10000, k[1] ≤ k[2]
.
Output
In a single line display through gap three numbers: first, the number of pupils at school, then the number of boys and then girls. Guaranteed that the input data is correct and the answer is always there.
Examples
Input #1
Answer #1
Submissions 2K
Acceptance rate 15%