{"raw_statement":[{"iden":"statement","content":"Sancho was making a road trip with his family and got really bored, so he recorded the position and initial speed of every car on the highway. For Sancho, the highway is an infinite straight line, the starting time is 0, the cars are moving points, and no car will pass another car (Sancho is very idealistic).\n\nThe cars maintain their initial speed unless they are slowed down by other cars. Car A is slowed down by car B if B started in front of A, but after a while, A reached B. When this happens, both cars move together and A's speed becomes the same as B's.\n\nSancho knows that there will be only a finite amount of times that a car will be slowed down by another car, and wants to know when the last slowing down will take place. If no car will be slowed down, the answer is 0.\n\nThe first line of the input contains a single integer N (1 ≤ N ≤ 105), indicating the number of cars. \n\nN lines follow. The i-th line contains two integers Si and Vi (0 ≤ S, V ≤ 109), indicating the starting position of the i-th car and its speed. No two cars start in the same position.\n\nOutput a single decimal number - the time of the last slow down. Your answer will be considered correct if the absolute or relative error is no greater than 10 - 4.\n\nNamely: let's assume that your answer is a, and the official answer is b. The checker program will consider your answer correct, if .\n\n"},{"iden":"input","content":"The first line of the input contains a single integer N (1 ≤ N ≤ 105), indicating the number of cars. N lines follow. The i-th line contains two integers Si and Vi (0 ≤ S, V ≤ 109), indicating the starting position of the i-th car and its speed. No two cars start in the same position."},{"iden":"output","content":"Output a single decimal number - the time of the last slow down. Your answer will be considered correct if the absolute or relative error is no greater than 10 - 4.Namely: let's assume that your answer is a, and the official answer is b. The checker program will consider your answer correct, if ."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ N \\in \\mathbb{Z}^+ $ be the number of guards.  \nLet $ Q \\in \\mathbb{Z}^+ $ be the number of operations.  \nLet $ I_i = [L_i, R_i] \\subseteq \\mathbb{Z} $ denote the interval of cells assigned to guard $ i $, for $ i \\in \\{1, \\dots, N\\} $.  \nLet $ \\mathcal{I} = \\{I_1, I_2, \\dots, I_N\\} $ be the current set of intervals.\n\n**Constraints**  \n1. $ 1 \\le N \\le 10^5 $  \n2. $ 1 \\le Q \\le 10^5 $  \n3. For each interval $ [L_i, R_i] $: $ L_i \\le R_i $, and $ L_i, R_i \\in \\mathbb{Z} $  \n4. Operations are of two types:  \n   - Type 1: Update guard $ i $'s interval to $ [L, R] $  \n   - Type 2: Query the total number of *distinct* cells covered by the union of all current intervals  \n\n**Objective**  \nFor each query operation (type 2), compute:  \n$$\n\\left| \\bigcup_{i=1}^{N} I_i \\right|\n$$  \ni.e., the cardinality of the union of all current intervals.","simple_statement":"You are given N guards, each assigned a range of jail cells [L_i, R_i].  \nThen you get Q operations:  \n- Type 1: Update a guard’s range to [L, R]  \n- Type 2: Query how many cells are watched by at least one guard  \n\nFor each query, output the total number of unique cells covered by all guards.","has_page_source":false}