In every magical forest, there is a magical café, run by magical squirrels. As is known, squirrels are rather lazy creatures and do not like to prepare too many different dishes. Therefore, visitors are offered a choice of only two dishes: a magical salad or another dish. When a visitor comes to the café, they order one of these two dishes.
Due to deteriorating diplomatic relations with the neighboring forest, this magical forest is experiencing an economic downturn, and the café cannot afford to buy new utensils. Therefore, there are only knives and forks in the café. To eat the salad, only a fork is required; for the other dish, both a fork and a knife are needed. Because of this, the squirrels are not always able to serve all visitors. That is, if there are not enough utensils at the moment a visitor arrives, the squirrels have to apologize, and the visitor goes to another café. If there are enough utensils, the visitor eats and returns them after their meal. Help the squirrels determine for each visitor whether there will be enough utensils.
The first line of the input file contains three integers , , (1 \leq n, m, k \leq 1000) — the number of forks, knives, and café visitors, respectively.
The next lines contain the descriptions of the visitors. Each description consists of three integers t_i, l_i, a_i (1 \leq t_i, l_i \leq 10000) — the time when the -th visitor arrives, how long they stay, and what they order. a_i is if the -th visitor orders only the magical salad, which requires just a fork, or if they order the other dish, which requires both a fork and a knife.
All visitors are listed in order of increasing arrival time (t_i < t_{i+1} for i = 1... (k-1)). No two visitors arrive at the same time. If some visitors leave at the same time a new one arrives, the new guest can immediately use their utensils, as the squirrels can wash them very quickly.
Print lines — one for each visitor. On the -th line, print Yes if the squirrels can serve the -th visitor, and No otherwise.
Example 1