• محدودیت زمان: ۱ ثانیه
  • محدودیت حافظه: ۲۵۶ مگابایت

In a relay running race, nn athletes of a team are initially positioned along a road. Specifically, the initial position of athlete ii is xix_i (in meters from an origin). This athlete can run up to viv_i meters per second. Initially, each athlete holds a baton.

The race starts by blowing a whistle and finishes when any athlete of the team holds all of the batons. In any moment during the race, each athlete can run along the road (in any of the two directions), or simply stop. When two athletes meet at the same position, each of them can pass all batons she or he holds to the other athlete.

You are the coach of the team. Your task is to find the shortest possible time the team can finish the race.

ورودی

In the first line of input, a single integer nn (1n1051 \leq n \leq 10^5) is given. In each of the next nn lines, two space-separated integers xix_i (0xi1060 \leq x_i \leq 10^6), and viv_i (1vi1061 \leq v_i \leq 10^6) are given.

خروجی

In the only line of the output, print a single number, the minimum amount of time the team can finish the race (in seconds). Your answer is considered to be correct if it has an absolute error of at most 10610^{-6}.

مثال

ورودی نمونه ۱

3
4 1
0 3
10 1
Plain text

خروجی نمونه ۱

2.50000
Plain text

ورودی نمونه ۲

1
100000 1000000
Plain text

خروجی نمونه ۲

0
Plain text

ارسال پاسخ برای این سؤال
فایلی انتخاب نشده است.