Fe3b0onacci Pairs#12462

Fe3b0onacci Pairs

2 seconds
256 megabytes
Medium

You are given an array consisting of elements numbered 1,2,...,n. De3b0o call's a pair where (i < j) a fe3b0onacci pair if the following condition holds.

\mathsf{Fib}(a_i + a_j) = \mathsf{Fib}(a_i) + \mathsf{Fib}(a_j)

where is the i_{th} Fibonacci number starting from index .

The first few terms of Fibonacci sequence are : \{0,1,1,2,3,5,8,13,...\}

Since De3b0o is the king of procrastinating , he asked you to calculate the number of fe3b0onacci pairs.

Input

The first line contains a single integer (1 \le t \le 10^4) — the number of test cases.

The first line of each test case contains a single integer (2 \le n \le 2 \cdot 10^5).

The second line of each test case contains integers a_1 , a_2 , ... a_n (0 \le a_i \le 10^9).

It's guaranteed that the sum of over all test cases does not exceed 2 \cdot 10^5.

Output

For each test case, print a single integer — the count of fe3b0onacci pairs.

Examples

Example 1

Loading
Loading

Note

In the first test case, Fe3b0onacci pairs are:

i = 1 , j = 2 , \mathsf{Fib}(0 + 1) = \mathsf{Fib}(0) + \mathsf{Fib}(1) = 0 + 1 = 1.

i = 1 , j = 3 , \mathsf{Fib}(0 + 2) = \mathsf{Fib}(0) + \mathsf{Fib}(2) = 0 + 1 = 1.

i = 2 , j = 3 , \mathsf{Fib}(1 + 2) = \mathsf{Fib}(1) + \mathsf{Fib}(2) = 1 + 1 = 2.

Scoring

  • Subtask ( points): No additional constraints.