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 double PI = 3.1415926535897932384626433832795;
long long n, k, lgn, len;
struct cplx {
  long double r, i;
  cplx(long double r = 0, long double i = 0) : r(r), i(i) {}
  cplx operator+(const cplx &B) const { return cplx(r + B.r, i + B.i); }
  cplx operator-(const cplx &B) const { return cplx(r - B.r, i - B.i); }
  cplx operator*(const cplx &B) const {
    return cplx(r * B.r - i * B.i, i * B.r + r * B.i);
  }
  cplx conj() { return cplx(r, -i); }
} w[16][70005] = {1};
int r[70005];
inline void FFT(cplx *A, int tp) {
  for (int i = 0; i < len; i++)
    if (i < r[i]) swap(A[i], A[r[i]]);
  for (int Len = 2, k = 0; Len <= len; Len <<= 1) {
    int l = Len >> 1;
    for (int st = 0; st < len; st += Len)
      for (int j = 0; j < l; j++) {
        cplx tmp = (tp == 1 ? w[k][j] : w[k][j].conj()) * A[st + j + l];
        A[st + j + l] = A[st + j] - tmp;
        A[st + j] = A[st + j] + tmp;
      }
    k++;
  }
  if (tp == -1)
    for (int i = 0; i < len; i++) A[i].r /= len;
}
inline int Pow(int base, int k) {
  int ret = 1;
  for (; k; k >>= 1, base = 1ll * base * base % 1000000007)
    if (k & 1) ret = 1ll * ret * base % 1000000007;
  return ret;
}
inline long long si(cplx a) { return (long long)(a.r + 0.5) % 1000000007; }
void Move(int A[70005], int B[70005], int ret[70005]) {
  static cplx sta[2][2][70005];
  for (int i = 0; i < len; i++)
    if (i <= k) {
      sta[0][0][i] = A[i] / 31623, sta[0][1][i] = A[i] % 31623;
      sta[1][0][i] = B[i] / 31623, sta[1][1][i] = B[i] % 31623;
    } else
      sta[0][0][i] = sta[0][1][i] = sta[1][0][i] = sta[1][1][i] = 0;
  FFT(sta[0][0], 1), FFT(sta[0][1], 1), FFT(sta[1][0], 1), FFT(sta[1][1], 1);
  static cplx rt[3][70005];
  for (int i = 0; i < len; i++)
    rt[0][i] = sta[0][1][i] * sta[1][1][i],
    rt[1][i] = sta[0][1][i] * sta[1][0][i] + sta[1][1][i] * sta[0][0][i],
    rt[2][i] = sta[0][0][i] * sta[1][0][i];
  FFT(rt[0], -1), FFT(rt[1], -1), FFT(rt[2], -1);
  for (int i = 0; i < len; i++)
    ret[i] = (llround(rt[0][i].r) % 1000000007 +
              1ll * llround(rt[1][i].r) % 1000000007 * 31623 % 1000000007 +
              1ll * llround(rt[2][i].r) % 1000000007 * 14122 % 1000000007) %
             1000000007;
}
void Solve(int A[70005], int B[70005], int idx, int ret[70005]) {
  int p2 = Pow(2, idx), sp2 = 1;
  static int sta[2][70005];
  for (int i = 0; i < len; i++, sp2 = 1ll * sp2 * p2 % 1000000007)
    sta[0][i] = 1ll * A[i] * sp2 % 1000000007, sta[1][i] = B[i];
  Move(sta[0], sta[1], ret);
}
int fac[70005], inv[70005], invf[70005];
int dpret[70005], baseret[70005];
int main() {
  scanf("%I64d%I64d", &n, &k);
  if (n > k) {
    printf("0\n");
    return 0;
  }
  for (lgn = 0; ((k + 1) << 1) >= (1 << lgn); lgn++)
    ;
  len = 1 << lgn;
  for (int i = 1; i < len; i++)
    r[i] = (r[i >> 1] >> 1) | ((i & 1) << (lgn - 1));
  for (int i = 2, k = 0; i <= len; i <<= 1) {
    for (int j = 0; j < i; j++)
      w[k][j] = cplx(cos(j * PI / (i / 2)), sin(j * PI / (i / 2)));
    k++;
  }
  fac[0] = fac[1] = inv[0] = inv[1] = invf[0] = invf[1] = 1;
  for (int i = 2; i <= k; i++)
    fac[i] = 1ll * fac[i - 1] * i % 1000000007,
    inv[i] =
        1ll * (1000000007 - 1000000007 / i) * inv[1000000007 % i] % 1000000007,
    invf[i] = 1ll * invf[i - 1] * inv[i] % 1000000007;
  for (int i = 1; i <= k; i++) baseret[i] = invf[i];
  dpret[0] = 1;
  int idx = 1;
  for (; n; n >>= 1, Solve(baseret, baseret, idx, baseret), idx <<= 1)
    if (n & 1) Solve(dpret, baseret, idx, dpret);
  int ans = 0;
  for (int i = 1; i <= k; i++)
    ans =
        (ans + 1ll * dpret[i] * fac[k] % 1000000007 * invf[k - i]) % 1000000007;
  printf("%d\n", (ans + 1000000007) % 1000000007);
}