Fence

Time limit1sMemory limit128 MB

Problem

Sanggeun is building a wooden fence next to his house. The fence is made by driving rectangular wooden planks into the ground.

While working, he became excited and forgot the original plan, so he placed planks carelessly. After finishing the fence, he looked at it proudly and then realized that it was a mess: some planks overlapped, and there were even holes in the middle.

In the figure, the thick line is the skyline.

Sanggeun is still shocked by the fence, but he likes the shape that was completed. He now wants to rebuild a fence with exactly the same shape using fewer wooden planks.

Two fences have the same shape if their skylines are the same.

Write a program that determines which wooden planks should remain so that the fence has the same shape.

Input

The first line contains the number of wooden planks Sanggeun used, N (1 <= N <= 100,000).

Each of the next N lines contains three integers X, W, and H, describing one wooden plank. X is the distance from Sanggeun's house, and W and H are the width and height of the plank. Every number is at most 10^9.

The planks are numbered from 1 to N in the order they are given.

Output

On the first line, print the number B of planks that remain. B must be as small as possible.

On the second line, print the indices of the planks that remain, separated by spaces. If there is more than one correct answer, print any one of them.