It's winter time!
Time for snowmen to play some games.
Two snowmen are playing a game.
In this game, the first snowman must choose a subset of the set {1, 2, ..., N}, and the second one must choose a subset of the set {1, 2, ..., M}.
The following two conditions must be fulfilled:

The two sets have an empty intersection.

The XOR of all elements in the first set is less than the XOR of all elements in the second set.
You are given two ints N and M.
Let X be the total number of different ways to choose the pair of sets.
Return the value (X modulo 1,000,000,007).
