#agc029b. [agc029_b]Powers of two

[agc029_b]Powers of two

给定 NN 个整数 A1,A2,,ANA_1,A_2,\cdots,A_N

你需要在其中选出尽可能多的不包含重复元素的二元组,使得每个二元组中的元素之和为 22 的非负整数次幂。

输出最多选出的二元组组数。

1N2×1051\le N\le 2\times 10^51Ai1091\le A_i\le 10^9