Follow Up Question : Count all such pairs


#1

To find out how many such pairs exist : Link