{"problem":{"name":"Water Heater","description":{"content":"We have a water heater, which supplies $W$ liters of hot water per minute. There are $N$ people. The $i$\\-th person plans to use $P_i$ liters of hot water per minute boiled by the heater from Time $S_","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc183_d"},"statements":[{"statement_type":"Markdown","content":"We have a water heater, which supplies $W$ liters of hot water per minute.\nThere are $N$ people. The $i$\\-th person plans to use $P_i$ liters of hot water per minute boiled by the heater from Time $S_i$ to $T_i$ (excluding at Time $T_i$ exactly). As hot water gets cold fast, it cannot be stored.\nIs it possible to supply hot water to the people according to their plans?\n\n## Constraints\n\n*   $1\\leq N \\leq 2\\times 10^5$\n*   $0\\leq S_i < T_i \\leq 2\\times 10^5$\n*   $1\\leq W, P_i \\leq 10^9$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $W$\n$S_1$ $T_1$ $P_1$\n$\\vdots$\n$S_N$ $T_N$ $P_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc183_d","tags":[],"sample_group":[["4 10\n1 3 5\n2 4 4\n3 10 6\n2 4 1","No\n\nBetween Time $3$ and $4$, the $2$\\-nd, $3$\\-rd, and $4$\\-th persons plan to use $4$, $6$, and $1$ liter(s) of hot water per minute, for a total of $11$ liters per minute.\nThe water heater can only supply $10$ liters of hot water per minute, which is not enough."],["4 10\n1 3 5\n2 4 4\n3 10 6\n2 3 1","Yes"],["6 1000000000\n0 200000 999999999\n2 20 1\n20 200 1\n200 2000 1\n2000 20000 1\n20000 200000 1","Yes"]],"created_at":"2026-03-03 11:01:14"}}