Farm
Spring has arrived, and the farmer is eager to enhance the fertility of his land, which measures x×y meters. To achieve this, he has purchased fertilizers. With n days remaining before the sowing season begins, the farmer aims to maximize his efforts.
Each day, the farmer can choose to perform one of the following actions:
Increase the productivity of a rectangular section of the land, with sides aligned to the coordinate axes, defined by the corners (x_1, y_1) and (x_2, y_2), by a value of w;
Calculate the total productivity of the section of land defined by the corners (x_1, y_1) and (x_2, y_2).
While the farmer enjoys the process of fertilizing his land, he prefers not to handle complex calculations. Your task is to assist him with this.
Input
The first line of the input contains the integers x and y (1 ≤ x, y ≤ 1000). The second line contains the number of days left until sowing begins, n (1 ≤ n ≤ 100000). The following n lines describe the farmer's actions for each day in the following format:
1 x_1 y_1 x_2 y_2 w - the farmer fertilizes the specified section of land. (1 ≤ x_1 ≤ x_2 ≤ x, 1 ≤ y_1 ≤ y_2 ≤ y, -10000 ≤ w ≤ 10000)
2 x_1 y_1 x_2 y_2 - the farmer requests the total fertility of the specified section of land. (1 ≤ x_1 ≤ x_2 ≤ x, 1 ≤ y_1 ≤ y_2 ≤ y)
Output
For each query regarding the fertility of a section of land, output the total fertility of that section on a separate line.