Paul is at the orchestra. The string section is arranged in an *r* × *c* rectangular grid and is filled with violinists with the exception of *n* violists. Paul really likes violas, so he would like to take a picture including at least *k* of them. Paul can take a picture of any axis-parallel rectangle in the orchestra. Count the number of possible pictures that Paul can take.

Two pictures are considered to be different if the coordinates of corresponding rectangles are different.
The first line of input contains four space-separated integers *r*, *c*, *n*, *k* (1 ≤ *r*, *c*, *n* ≤ 3000, 1 ≤ *k* ≤ *min*(*n*, 10)) — the number of rows and columns of the string section, the total number of violas, and the minimum number of violas Paul would like in his photograph, respectively.

The next *n* lines each contain two integers *x*<sub class="lower-index">*i*</sub> and *y*<sub class="lower-index">*i*</sub> (1 ≤ *x*<sub class="lower-index">*i*</sub> ≤ *r*, 1 ≤ *y*<sub class="lower-index">*i*</sub> ≤ *c*): the position of the *i*-th viola. It is guaranteed that no location appears more than once in the input.
We will use '*' to denote violinists and '#' to denote violists.

In the first sample, the orchestra looks as follows: 

In the second sample, the orchestra looks as follows: 

In the third sample, the orchestra looks the same as in the second sample.
def count_pictures(r, c, n, t, tuba_positions):
    # Initialize a 2D prefix sum array to quickly count tuba players in any rectangle
    prefix_sum = [[0] * (c + 1) for _ in range(r + 1)]
    
    for x, y in tuba_positions:
        prefix_sum[x][y] = 1
    
    # Compute prefix sums along rows
    for i in range(1, r + 1):
        for j in range(1, c + 1):
            prefix_sum[i][j] += prefix_sum[i][j - 1]
    
    # Compute prefix sums along columns
    for i in range(1, r + 1):
        for j in range(1, c + 1):
            prefix_sum[i][j] += prefix_sum[i - 1][j]
    
    # Count the number of valid pictures
    total_pictures = 0
    for x1 in range(1, r + 1):
        for y1 in range(1, c + 1):
            for x2 in range(x1, r + 1):
                for y2 in range(y1, c + 1):
                    tuba_count = prefix_sum[x2][y2] - prefix_sum[x1 - 1][y2] - prefix_sum[x2][y1 - 1] + prefix_sum[x1 - 1][y1 - 1]
                    if tuba_count >= t:
                        total_pictures += 1
    
    return total_pictures

# Read input
r, c, n, t = map(int, input().split())
tuba_positions = [list(map(int, input().split())) for _ in range(n)]

# Calculate and print the number of valid pictures
result = count_pictures(r, c, n, t, tuba_positions)
print(result)
