Farmer John has received a shipment of large hay bales and placed them at various locations along the road connecting his barn and his house. Each bale has a size s_j and a distinct position p_j along the one-dimensional road. Bessie the cow is currently at position , where there is no hay bale.
Bessie can move freely along the road, including up to the position of a hay bale, but she cannot pass through a bale. As an exception, if she runs in the same direction for units of distance, she builds up enough speed to break through and permanently eliminate any hay bale whose size is strictly less than . After breaking through a bale, she may have enough space to build up speed and break through additional hay bales.
Farmer John is currently repainting his house and barn, and wants to make sure that Bessie cannot reach either one (cows and fresh paint do not make a good combination!). Therefore, FJ wants to ensure that Bessie can never break through the leftmost or rightmost hay bale, keeping her effectively trapped between the two outermost bales.
FJ can add hay to a single bale of his choice to help keep Bessie trapped. Please determine the minimum amount of extra hay that FJ needs to add to some bale to ensure that Bessie cannot escape.
The first line contains two integers and b~(1 \le n \le 10^5), where is the number of hay bales and is Bessie's initial position.
Each of the next lines contains two integers s_j and p_j, representing the size and position of the -th hay bale.
All sizes and positions are between and 10^9, inclusive.
Print one integer: the minimum amount of additional hay that FJ must add to a single bale to prevent Bessie from escaping.
Print if it is impossible to prevent Bessie's escape.
Example 1