#abc138f. [abc138_f]Coincidence

[abc138_f]Coincidence

Problem Statement

Given are integers LL and RR. Find the number, modulo 109+710^9 + 7, of pairs of integers (x,y)(x, y) (LleqxleqyleqR)(L \\leq x \\leq y \\leq R) such that the remainder when yy is divided by xx is equal to ytextXORxy \\text{ XOR } x.

What is textXOR\\text{ XOR }?

The XOR of integers AA and BB, AtextXORBA \\text{ XOR } B, is defined as follows:

  • When AtextXORBA \\text{ XOR } B is written in base two, the digit in the 2k2^k's place (kgeq0k \\geq 0) is 11 if either AA or BB, but not both, has 11 in the 2k2^k's place, and 00 otherwise.

For example, 3textXOR5=63 \\text{ XOR } 5 = 6. (In base two: 011textXOR101=110011 \\text{ XOR } 101 = 110.)

Constraints

  • 1leqLleqRleq10181 \\leq L \\leq R \\leq 10^{18}

Input

Input is given from Standard Input in the following format:

LL RR

Output

Print the number of pairs of integers (x,y)(x, y) (LleqxleqyleqR)(L \\leq x \\leq y \\leq R) satisfying the condition, modulo 109+710^9 + 7.


Sample Input 1

2 3

Sample Output 1

3

Three pairs satisfy the condition: (2,2)(2, 2), (2,3)(2, 3), and (3,3)(3, 3).


Sample Input 2

10 100

Sample Output 2

604

Sample Input 3

1 1000000000000000000

Sample Output 3

68038601

Be sure to compute the number modulo 109+710^9 + 7.