Count the Pairs

Problem Name:
Count the Pairs
Site:Spoj
Links:
Tags:
Problem setters: