Tinted Glass Window

No attempts yetTime limit1sMemory limit256 MB

Problem

You place N rectangular grey-tinted glass panes to build a stained glass window. Each pane adds an integer tint-factor. Where panes overlap, the tint-factors add.

Each pane is axis-aligned. Find the total area whose tint-factor is at least T.

Input

The first line is N (1 ≤ N ≤ 1000). The second line is T (1 ≤ T ≤ 1 000 000 000). Each of the next N lines has five integers xl yt xr yb ti. The top-left corner is (xl, yt), the bottom-right is (xr, yb), and ti is the pane tint-factor. You have 1 ≤ ti ≤ 1 000 000, 0 ≤ xl < xr ≤ K, 0 < yt < yb ≤ K, and K ≤ 1 000 000 000.

Output

Print the total area with tint-factor at least T. Every answer is below 2^64.