Problem: Let's define the transformation P of a sequence of integers a1, a2, ..., an as b1, b2, ..., bn, where bi = a1 | a2 | ... | ai for all i = 1, 2, ..., n, where | is the bitwise OR operation.

Vasya consequently applies the transformation P to all sequences of length n consisting of integers from 1 to 2k - 1 inclusive. He wants to know how many of these sequences have such property that their transformation is a strictly increasing sequence. Help him to calculate this number modulo 109 + 7.

Input

The only line of the input contains two integers n and k (1 ≤ n ≤ 1018, 1 ≤ k ≤ 30 000).

Output

Print a single integer — the answer to the problem modulo 109 + 7.

Examples

Input

1 2


Output

3


Input

2 3


Output

30


Input

3 3


Output

48

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 66005;
const long long mod = 1000000007;
long long tmp, x, y, ans, jc[N];
int k, n, m, rev[N];
long long fastpow(long long a, long long x, long long mod) {
  long long res = 1;
  while (x) {
    if (x & 1) {
      res *= a;
      res %= mod;
    }
    x >>= 1;
    a *= a;
    a %= mod;
  }
  return res;
}
long long exgcd(long long a, long long b, long long &x, long long &y) {
  if (!b) {
    x = 1;
    y = 0;
    return a;
  }
  long long d = exgcd(b, a % b, y, x);
  y -= a / b * x;
  return d;
}
long long getinv(long long a, long long mod) {
  exgcd(a, mod, x, y);
  x = (x % mod + mod) % mod;
  return x;
}
long long C(long long m, long long n) {
  return jc[m] * getinv(jc[n], mod) % mod * getinv(jc[m - n], mod) % mod;
}
long long mul(long long a, long long b, long long mod) {
  long long d = (long long)floor(a * (double)b / mod + 0.5);
  long long res = a * b - d * mod;
  if (res < 0) {
    res += mod;
  }
  return res;
}
struct NTT {
  long long g, mod, a[N], b[N];
  void ntt(long long *a, int dft) {
    for (register int i = 0; i < n; i++) {
      if (i < rev[i]) {
        swap(a[i], a[rev[i]]);
      }
    }
    for (int i = 1; i < n; i <<= 1) {
      long long wn = fastpow(g, (mod - 1) / i / 2, mod);
      if (dft == -1) {
        wn = getinv(wn, mod);
      }
      for (register int j = 0; j < n; j += i << 1) {
        long long w = 1, x, y;
        for (register int k = j; k < j + i; k++, w = w * wn % mod) {
          x = a[k];
          y = w * a[k + i] % mod;
          a[k] = x + y;
          a[k] = a[k] >= mod ? a[k] - mod : a[k];
          a[k + i] = x - y;
          a[k + i] = a[k + i] < 0 ? a[k + i] + mod : a[k + i];
        }
      }
    }
    if (dft == -1) {
      long long inv = getinv(n, mod);
      for (register int i = 0; i < n; i++) {
        a[i] = a[i] * inv % mod;
      }
    }
  }
} a, b, c;
long long m1 = 998244353, m2 = 1004535809, m3 = 1998585857;
long long _M = m1 * m2, inv1 = getinv(m1, m2), inv2 = getinv(m2, m1),
          inv12 = getinv(_M, m3);
long long CRT(long long a1, long long a2, long long a3) {
  long long A =
      (mul(a1 * m2 % _M, inv2, _M) + mul(a2 * m1 % _M, inv1, _M)) % _M;
  long long k = ((long long)a3 + m3 - A % m3) * inv12 % m3;
  return (k * (_M % mod) + A) % mod;
}
void ntt(NTT &a) {
  memcpy(b.a, a.a, sizeof(a.a));
  memcpy(b.b, a.b, sizeof(a.b));
  memcpy(c.a, a.a, sizeof(a.a));
  memcpy(c.b, a.b, sizeof(a.b));
  a.ntt(a.a, 1);
  a.ntt(a.b, 1);
  for (int i = 0; i < n; i++) {
    a.a[i] = a.a[i] * a.b[i] % a.mod;
  }
  a.ntt(a.a, -1);
  b.ntt(b.a, 1);
  b.ntt(b.b, 1);
  for (int i = 0; i < n; i++) {
    b.a[i] = b.a[i] * b.b[i] % b.mod;
  }
  b.ntt(b.a, -1);
  c.ntt(c.a, 1);
  c.ntt(c.b, 1);
  for (register int i = 0; i < n; i++) {
    c.a[i] = c.a[i] * c.b[i] % c.mod;
  }
  c.ntt(c.a, -1);
  for (int i = 0; i < n; i++) {
    a.a[i] = CRT(a.a[i], b.a[i], c.a[i]);
  }
}
void solve(int m) {
  if (m == 1) {
    for (register int i = 1; i <= k; i++) {
      a.a[i] = 1;
    }
    return;
  }
  int tmp = m / 2;
  solve(tmp);
  for (register int i = 0; i < n; i++) {
    if (i < tmp || i > k) {
      a.a[i] = a.b[i] = 0;
    }
  }
  for (int i = tmp; i <= k; i++) {
    a.b[i] = a.a[i] * getinv(jc[i], mod) % mod;
  }
  for (int i = tmp; i <= k; i++) {
    a.a[i] *= fastpow(2, tmp * i, mod) * getinv(jc[i], mod) % mod;
    a.a[i] %= mod;
  }
  ntt(a);
  for (register int i = 2 * tmp; i <= k; i++) {
    a.a[i] = a.a[i] * jc[i] % mod;
  }
  if (m & 1) {
    for (int i = 0; i < n; i++) {
      a.b[i] = 0;
      if (i < m - 1 || i > k) {
        a.a[i] = 0;
      }
    }
    for (int i = m - 1; i <= k; i++) {
      a.a[i] *= getinv(jc[i], mod) * fastpow(2, i, mod) % mod;
      a.a[i] %= mod;
    }
    for (int i = 1; i <= k; i++) {
      a.b[i] = getinv(jc[i], mod);
    }
    ntt(a);
    for (register int i = m; i <= k; i++) {
      a.a[i] = a.a[i] * jc[i] % mod;
    }
  }
}
int main() {
  a.g = b.g = c.g = 3;
  a.mod = 998244353;
  b.mod = 1004535809;
  c.mod = 1998585857;
  scanf("%I64d%d", &tmp, &k);
  if (tmp > k) {
    puts("0");
    return 0;
  }
  jc[0] = 1;
  for (int i = 1; i <= k; i++) {
    jc[i] = jc[i - 1] * i % mod;
  }
  m = tmp;
  for (n = 1; n <= k * 2; n <<= 1)
    ;
  for (int i = 0; i < n; i++) {
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) * (n >> 1));
  }
  solve(m);
  for (int i = m; i <= k; i++) {
    ans += C(k, i) * a.a[i] % mod;
    ans %= mod;
  }
  printf("%I64d\n", ans);
  return 0;
}