Count the Number of Fair Pairs | Leetcode 2563