Erik wants to run a marathon. Most of all, he wants to win the race. To plan his training, he has looked up how the other contestants performed in previous races and made a model to predict his chances of winning. The finishing time for each contestant is distributed uniformly at random in an interval \[a_i,b_i]. What is the largest finishing time Erik can have while still having a 50 change of winning?
The first line contains an integer 1≤N≤105, the number of other contestants. Then follows N lines, each with two floating point values 0≤a_i≤105 and a_i≤b_i≤105 with at exactly one decimal place, the start and end time in seconds for their finishing time.
A single floating point number, the largest finishing time in seconds that Erik needs to have a 50 chance of winning. The answer must be with a relative or absolute error of at most 10−6.