Trade
In a distant kingdom, beyond the nine lands, there was a merchant who dealt in specific goods. He thrived and made profits until the king of this realm decided to levy a tax on each trade transaction. The tax rate was set at p per-q-cent, meaning p/q of the transaction amount. If the tax amount is not an integer, it should be rounded to the nearest whole number. In cases where the nearest whole number is not unique, the larger number is chosen.
The merchant possesses N units of goods, each priced at c. Multiple buyers can approach him, each capable of purchasing any number of units. The merchant continues trading until all his goods are sold.
As the goods are not yet on sale, the merchant wishes to estimate the amount he can receive after tax deductions in both the worst and best-case scenarios. He seeks your assistance in this matter.
Input
The input consists of a single line containing four integers N, c, p, and q (0 ≤ N ≤ 10^9, 0 ≤ c ≤ 10^9, 0 ≤ p < q ≤ 10^9).
Output
Output a single line with two integers - the minimum and maximum amount the merchant can receive for his goods.