CF18B Platforms
Description
In one one-dimensional world there are $ n $ platforms. Platform with index $ k $ (platforms are numbered from 1) is a segment with coordinates $ [(k-1)m,(k-1)m+l] $ , and $ l
Input Format
The first input line contains 4 integer numbers $ n $ , $ d $ , $ m $ , $ l $ ( $ 1
Output Format
Output the coordinates of the point, where the grosshopper will fall down. Don't forget that if Bob finds himself on the platform edge, he doesn't fall down.