Input is vector of pair
Input :- { {8,0} , {4,0} , {2,0} , {1,0} , {0,32} , {0,16} , {0,8} , {0,4} ,{0,2} ,{0,1} }
Output :- { {0,32} , {0,16} , {0,8} , {0,4} , {0,2} , {0,1} , {8,0} , {4,0} , {2,0} , {1,0} }
Keeping first priority as descending order of pair.second.
keeping second priority as descending order of pair.first.