SP32439 ADABLOOM - Ada and Bloom

Description

As you might already know, Ada the Ladybug is a farmer. She grows many beautiful flowers. Each of the flowers has something called "blooming value". As long as **A $ _{i} $ < A $ _{i} $** ⊕ **A $ _{j} $ < A $ _{j} $** (where ⊕ stands for binary XOR, and **A** stands for "blooming value") is true for any pair of flowers (in any order), then those flowers-pair might bloom into a wonderful blossom, if they are replanted into same box (at most 2 flowers can be put into one box). Ada wants to maximize the number of blossoms - can you find it?

Input Format

The first line of input containt **1 test-cases.** The first line of each test-case contains **N 1** The next line contains **N** integers **0 < A $ _{i} $ , the blooming value of flower.** **NOTE:** The number of test-cases varies depending on size of array (the longest array won't be a single file more than once).

Output Format

For each test-cases, print the maximal number of blossoms Ada can achieve.