Alice and Bonnie are sisters, but they don't like each other very much. So when some old family photos were found in the attic, they started to argue about who should receive which photos. In the end, they decided that they would take turns picking photos. Alice goes first.
There are _n_ stacks of photos. Each stack contains **exactly two** photos. In each turn, a player may take only a photo from the top of one of the stacks.
Each photo is described by two non-negative integers _a_ and _b_, indicating that it is worth _a_ units of happiness to Alice and _b_ units of happiness to Bonnie. Values of _a_ and _b_ might differ for different photos.
It's allowed to pass instead of taking a photo. The game ends when all photos are taken or both players pass consecutively.
The players don't act to maximize their own happiness. Instead, each player acts to maximize the amount by which her happiness exceeds her sister's. Assuming both players play optimal, find the difference between Alice's and Bonnie's happiness. That is, if there's a perfectly-played game such that Alice has _x_ happiness and Bonnie has _y_ happiness at the end, you should print _x_ - _y_.
## Input
The first line of input contains a single integer _n_ (1 ≤ _n_ ≤ 100 000) — the number of two-photo stacks. Then follow _n_ lines, each describing one of the stacks. A stack is described by four space-separated non-negative integers _a_1, _b_1, _a_2 and _b_2, each not exceeding 109. _a_1 and _b_1 describe the top photo in the stack, while _a_2 and _b_2 describe the bottom photo in the stack.
## Output
Output a single integer: the difference between Alice's and Bonnie's happiness if both play optimally.
[samples]
Alice 和 Bonnie 是姐妹,但她们彼此并不喜欢。当在阁楼里发现了一些旧家庭照片时,她们开始争论谁应该得到哪些照片。最终,她们决定轮流挑选照片,Alice 先手。
有 #cf_span[n] 堆照片。每堆恰好包含 *两张* 照片。在每一轮中,玩家只能从某一堆的顶部取一张照片。
每张照片由两个非负整数 #cf_span[a] 和 #cf_span[b] 描述,表示该照片给 Alice 带来 #cf_span[a] 单位的幸福感,给 Bonnie 带来 #cf_span[b] 单位的幸福感。不同照片的 #cf_span[a] 和 #cf_span[b] 值可能不同。
玩家可以选择跳过而不取照片。当所有照片都被取完或两名玩家连续跳过时,游戏结束。
玩家的目标不是最大化自己的幸福感,而是最大化自己幸福感与姐妹幸福感的差值。假设两名玩家都采取最优策略,求 Alice 与 Bonnie 的幸福感之差。也就是说,如果存在一个完美博弈,使得最终 Alice 的幸福感为 #cf_span[x],Bonnie 的幸福感为 #cf_span[y],则你应该输出 #cf_span[x - y]。
输入的第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 100 000]) —— 两照片堆的数量。接下来是 #cf_span[n] 行,每行描述一个堆。一个堆由四个用空格分隔的非负整数 #cf_span[a1], #cf_span[b1], #cf_span[a2] 和 #cf_span[b2] 描述,每个数不超过 #cf_span[109]。其中 #cf_span[a1] 和 #cf_span[b1] 描述堆顶的照片,#cf_span[a2] 和 #cf_span[b2] 描述堆底的照片。
输出一个整数:若双方都采取最优策略,Alice 与 Bonnie 的幸福感之差。
## Input
输入的第一行包含一个整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 100 000]) —— 两照片堆的数量。接下来是 #cf_span[n] 行,每行描述一个堆。一个堆由四个用空格分隔的非负整数 #cf_span[a1], #cf_span[b1], #cf_span[a2] 和 #cf_span[b2] 描述,每个数不超过 #cf_span[109]。其中 #cf_span[a1] 和 #cf_span[b1] 描述堆顶的照片,#cf_span[a2] 和 #cf_span[b2] 描述堆底的照片。
## Output
输出一个整数:若双方都采取最优策略,Alice 与 Bonnie 的幸福感之差。
[samples]
**Definitions**
Let $ n \in \mathbb{Z}^+ $ be the number of stacks.
For each stack $ i \in \{1, \dots, n\} $, define the top photo as $ (a_{i,1}, b_{i,1}) $ and the bottom photo as $ (a_{i,2}, b_{i,2}) $, where $ a_{i,j}, b_{i,j} \in \mathbb{R}_{\geq 0} $.
Let $ S_i = \{(a_{i,1}, b_{i,1}), (a_{i,2}, b_{i,2})\} $ denote the set of two photos in stack $ i $, ordered top to bottom.
**Constraints**
1. $ 1 \leq n \leq 100{,}000 $
2. $ 0 \leq a_{i,j}, b_{i,j} \leq 10^9 $ for all $ i \in \{1, \dots, n\}, j \in \{1,2\} $
**Objective**
Alice and Bonnie alternate turns, Alice first. On each turn, a player may take the top photo from any non-empty stack, or pass. The game ends when all photos are taken or two consecutive passes occur.
Each player aims to **maximize the difference between their own happiness and their opponent’s**.
Define the total happiness difference as $ D = A - B $, where $ A $ is Alice’s total happiness and $ B $ is Bonnie’s.
Compute $ D $ under optimal play.