G. Dragon Scales
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Chen lives in a 2D world. To celebrate the end of the Year of the Dragon, $$$n$$$ dragons are flying around in the sky.

We can think of this world as an $$$m$$$ wide grid, labeled horizontally from $$$1$$$ to $$$m$$$ and vertically from $$$0$$$ to $$$\infty$$$. Chen can only move horizontally along the line $$$y=0$$$. All dragons can be treated as perfectly horizontal height 1 rectangles, and they all fly above Chen.

The $$$i$$$th dragon spans horizontally from location $$$l_i$$$ to $$$r_i$$$, inclusive. Furthermore, each dragon is associated with an power value $$$p_i$$$. Let the locations that each dragon takes up be 1-indexed from left to right. Dragons get scalier as they grow, so $$$j$$$th index of the $$$i$$$th dragon has $$$p_i \cdot j$$$ scales on it.

For each position $$$i$$$, or coordinate $$$(i,0)$$$, that Chen can stand on, she wants to know how many scales would directly be above her.

Input

The first line of input contains two integers $$$n$$$ and $$$m$$$ ($$$1 \leq n, m \leq 2 \cdot 10^5$$$) - the number of dragon's and the total width of the grid.

Each of the following $$$n$$$ lines will contain 3 integers $$$l_i, r_i, p_i$$$ ($$$1 \leq l_i \leq r_i \leq m, 1 \leq p_i \leq 2 \cdot 10^6$$$) — denoting that the $$$i$$$th dragon stretches from index $$$l_i$$$ to $$$r_i$$$ and has power $$$p_i$$$.

Output

Output $$$m$$$ space-separated integers, with the $$$i$$$th integer representing the number of scales above Chen if she is standing at position $$$i$$$.

Examples
Input
2 4
1 3 1
4 4 5
Output
1 2 3 5 
Input
2 6
1 6 1
3 4 4
Output
1 2 7 12 5 6 
Note

In the first test case, the first dragon contributes 1 scale to position 1, 2 scales to position 2, 3 scales to position 3, and 0 scales to position 4. The second dragon contributes 5 scales to position 4