CF1221F Choose a Square

Description

Petya recently found a game "Choose a Square". In this game, there are $ n $ points numbered from $ 1 $ to $ n $ on an infinite field. The $ i $ -th point has coordinates $ (x_i, y_i) $ and cost $ c_i $ . You have to choose a square such that its sides are parallel to coordinate axes, the lower left and upper right corners belong to the line $ y = x $ , and all corners have integer coordinates. The score you get is the sum of costs of the points covered by the selected square minus the length of the side of the square. Note that the length of the side can be zero. Petya asks you to calculate the maximum possible score in the game that can be achieved by placing exactly one square.

Input Format

N/A

Output Format

N/A

Explanation/Hint

The field corresponding to the first example: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1221F/e9d6acfe5801db49535c73c7e3aac9d122102fde.png)