Envelopes are pairs. You can nest envelope inside if and . Sort by width ascending, then by height descending within same width. This keeps we can't nest envelopes with same width.
Now run LIS on the heights. The descending tie-break prevents using two envelopes with same width. Example: → sorted: → heights: → LIS: .