Everybody knows that lucky numbers are positive integers that contain only lucky digits 4 and 7 in their decimal representation. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.

Polo the Penguin have two positive integers l and r (l < r), both of them are lucky numbers. Moreover, their lengths (that is, the number of digits in the decimal representation without the leading zeroes) are equal to each other.

Let's assume that n is the number of distinct lucky numbers, each of them cannot be greater than r or less than l, and ai is the i-th (in increasing order) number of them. Find a1·a2 + a2·a3 + ... + an - 1·an. As the answer can be rather large, print the remainder after dividing it by 1000000007 (109 + 7).

Input

The first line contains a positive integer l, and the second line contains a positive integer r (1 ≤ l < r ≤ 10100000). The numbers are given without any leading zeroes.

It is guaranteed that the lengths of the given numbers are equal to each other and that both of them are lucky numbers.

Output

In the single line print a single integer — the answer to the problem modulo 1000000007 (109 + 7).

Examples

Input

4
7


Output

28


Input

474
777


Output

2316330
#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 7, Mod = 1000000000 + 7;
int n, m, k;
char L[N], R[N];
inline long long Get(char* S, int n) {
  long long Ret = 0, a = 0, b = 0, c = 0, d = 1, Limit = 0;
  for (int i = (0), iLimit = (n - 1); i <= iLimit; (++(i))) {
    Ret = (100 * Ret + 100 * b + 220 * a + 70 * (Limit - c + Mod) % Mod +
           56 * (d - 1)) %
          Mod;
    b = (200 * b + 220 * a + 65 * (d - 1)) % Mod;
    a = (20 * a + 11 * (d - 1)) % Mod;
    if (S[i] == '7') {
      long long p4 = (Limit * 10 + 4) % Mod, p7 = (Limit * 10 + 7) % Mod;
      (Ret += p4 * p7) %= Mod;
      (b += p4 * p4) %= Mod;
      (a += p4) %= Mod;
    }
    Limit = (Limit * 10 + (S[i] - '0')) % Mod;
    c = (c * 10 + 4) % Mod;
    d = ((d - 1) * 2 + (S[i] == '4' ? 1 : 2)) % Mod;
  }
  return Ret;
}
int main() {
  cin >> L >> R;
  printf("%lld\n", (Get(R, strlen(R)) - Get(L, strlen(L)) + Mod) % Mod);
  return 0;
}
