Why UVA-1196 (Tiling up blocks) needs dynamic programming to be solved?

My idea was to simply a take a vector of pairs , sort them in ascending order, and then run a loop, increment the answer each time I find a pair where both elements are greater or equal to the latest pair for which we incremented our answer. In short why greedy approach does not work?

Seems like longest increasing subsequence!