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;
template <typename T1, typename T2>
inline T1 max(T1 a, T2 b) {
  return a < b ? b : a;
}
template <typename T1, typename T2>
inline T1 min(T1 a, T2 b) {
  return a < b ? a : b;
}
const char lf = '\n';
namespace ae86 {
const int bufl = 1 << 15;
char buf[bufl], *s = buf, *t = buf;
inline int fetch() {
  if (s == t) {
    t = (s = buf) + fread(buf, 1, bufl, stdin);
    if (s == t) return EOF;
  }
  return *s++;
}
inline int ty() {
  int a = 0;
  int b = 1, c = fetch();
  while (!isdigit(c)) b ^= c == '-', c = fetch();
  while (isdigit(c)) a = a * 10 + c - 48, c = fetch();
  return b ? a : -a;
}
template <typename T>
inline int ts(T *s) {
  int a = 0, c = fetch();
  while (c <= 32 && c != EOF) c = fetch();
  while (c > 32 && c != EOF) s[a++] = c, c = fetch();
  s[a] = 0;
  return a;
}
}  // namespace ae86
using ae86::ts;
using ae86::ty;
const int _ = 100007, mo = 1000000007;
template <typename T1, typename T2>
inline T1 ad(T1 &a, T2 b) {
  return a = a + b >= mo ? a + b - mo : a + b;
}
template <typename T1, typename T2>
inline T1 dl(T1 &a, T2 b) {
  return a = a >= b ? a - b : a - b + mo;
}
template <typename T1, typename T2>
inline T1 add(T1 a, T2 b) {
  return a + b >= mo ? a + b - mo : a + b;
}
template <typename T1, typename T2>
inline T1 del(T1 a, T2 b) {
  return a >= b ? a - b : a - b + mo;
}
long long powa(long long a, long long t) {
  long long b = 1;
  while (t) {
    if (t & 1) b = b * a % mo;
    a = a * a % mo, t >>= 1;
  }
  return b;
}
inline long long inva(long long a) { return powa(a, mo - 2); }
struct cxk {
  long long ans, l, r, cnt, sum;
  cxk(long long ans_ = 0, long long l_ = 0, long long r_ = 0,
      long long cnt_ = 0, long long sum_ = 0) {
    ans = ans_, l = l_, r = r_, cnt = cnt_, sum = sum_;
  }
  void putadd(long long x) {
    x %= mo;
    ad(ans, x * x % mo * del(cnt, 1) % mo);
    ad(ans, del(add(sum, sum), add(l, r)) * x % mo);
    ad(l, x), ad(r, x), ad(sum, cnt * x % mo);
  }
  friend cxk operator+(cxk a, cxk b) {
    if (!a.cnt) return b;
    if (!b.cnt) return a;
    cxk c;
    c.ans = add(add(a.ans, b.ans), a.r * b.l % mo);
    c.l = a.l, c.r = b.r, c.cnt = add(a.cnt, b.cnt), c.sum = add(a.sum, b.sum);
    return c;
  }
};
int n, xl[_], xr[_];
cxk dlq[_][2][2];
bool got[_][2][2] = {0};
cxk cxkdlq(int now, int wl, int wr) {
  if (now <= 0) return cxk(0, 0, 0, 1, 0);
  if (got[now][wl][wr]) return dlq[now][wl][wr];
  got[now][wl][wr] = 1;
  cxk ans;
  if (!wl || xl[now] == 4) {
    cxk temp = cxkdlq(now - 1, wl & (xl[now] == 4), wr & (xr[now] == 4));
    temp.putadd(powa(10, now - 1) * 4 % mo), ans = ans + temp;
  }
  if (!wr || xr[now] == 7) {
    cxk temp = cxkdlq(now - 1, wl & (xl[now] == 7), wr & (xr[now] == 7));
    temp.putadd(powa(10, now - 1) * 7 % mo), ans = ans + temp;
  }
  return dlq[now][wl][wr] = ans;
}
int main() {
  ios::sync_with_stdio(0), cout.tie(nullptr);
  n = ts(xl + 1), ts(xr + 1);
  for (int i = 1; i <= n; i++) xl[i] -= '0', xr[i] -= '0';
  reverse(xl + 1, xl + n + 1), reverse(xr + 1, xr + n + 1);
  cout << cxkdlq(n, 1, 1).ans << lf;
  return 0;
}
