First, delete all intervals that contains some other intervals. If , mark all positions in as , and delete .
After this, let the remaining intervals be sorted as . Since no interval contains another one, we have and .
For every position not marked as , the intervals containing form a consecutive range, say .
Construct a flow graph with vertices . For each such position, add an edge with capacity . Choosing this edge is equivalent to setting . For every , the edges crossing the cut between and are exactly the positions contained in .
All intervals have sum iff there is a flow of value from to . So the answer is Yes iff the maximum flow is at least .
Time complexity: .