Given two non-negative integers $$$X$$$ and $$$Y$$$, determine the value of $$$$$$ \sum_{i=0}^{X}\sum_{j=[i=0]}^{Y}[i\&j=0]\lfloor\log_2(i+j)+1\rfloor $$$$$$ modulo $$$10^9+7$$$ where
The first line contains one integer $$$T\,(1\le T \le 10^5)$$$ denoting the number of test cases.
Each of the following $$$T$$$ lines contains two integers $$$X, Y\,(0\le X,Y \le 10^9)$$$ indicating a test case.
For each test case, print one line containing one integer, the answer to the test case.
For the first test case:
So the answer is $$$1\times 2 + 2\times 6 = 14$$$.