Сharity work
Medium
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Peter likes to take care of grandmothers and their well-being. Every n-th day he transferred old women across the road, every k-th he declared that the welfare of grandmothers increased, and every m-th day he promised that soon they would be even better. Today he did three things and was very tired, but he was very pleased.
Write a program that will determine after how many days such a meaningful day will happen, and how many boring days will happen during this period, when he will not do any of his favorite things.
Input
Three numbers n, m, k (1 ≤ n, m, k ≤ 2 * 10^9
).
Output
Print two numbers - in how many days a meaningful day happens and the number of boring days.
Examples
Input #1
Answer #1
Submissions 975
Acceptance rate 12%