Give O(n log n) algorithm for pairs (i<j) with a_i > 2*a_j

Analyze the give o(n log n) algorithm for pairs (i<j) with a_i > 2*a_j.

Examples
Input: "test_input_1"
Output: "output_1"
Hints

Give O(n log n) algorithm for pairs (i<j) with a_i > 2*a_j

Analyze the give o(n log n) algorithm for pairs (i<j) with a_i > 2*a_j.