A New Scheduler
You are given a list of task schedules that should be run on a multi-core CPU. Each task takes one CPU slice but should be executed in the specified time range. Knowing the number of cores in the new CPU model, can you make a scheduler that will optimally allocate CPU cores to tasks so that all tasks are executed or report that it is impossible?
The first line of input contains two numbers \(1 \leq N \leq 1000\) number of tasks and \(1 \leq C \leq 100\) the number of CPU cores.
\(N\) lines follow, each line contains two integers \(1 \leq s_i \leq e_i \leq 100\) the time range (in quantum) where we can execute task \(i\).
If we can run every task within the given constraints print \(Yes\) otherwise, print \(No\).
4 3 1 2 2 3 2 3 1 1
4 1 1 2 2 3 2 3 1 1
A CPU core can only execute \(**at most one**\) single task in a given slice.