Number of Perfect Pairs
Count index pairs i < j whose values a and b satisfy two conditions: the smaller of |a - b| and |a + b| is at most the smaller of |a| and |b|, and the larger of |a - b| and |a + b| is at least the larger of |a| and |b|.
Count index pairs i < j whose values a and b satisfy two conditions: the smaller of |a - b| and |a + b| is at most the smaller of |a| and |b|, and the larger of |a - b| and |a + b| is at least the larger of |a| and |b|.