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 MOD = 1000000007;
const double PI = acos(-1);
const int N = 65536, LN = 16, L = 15, MASK = (1 << L) - 1;
int bitrev[N];
complex<double> w[N];
void FFTInit() {
  for (int i = 0; i < N; ++i) {
    bitrev[i] = (bitrev[i >> 1] >> 1) | ((i & 1) << (LN - 1));
    w[i] = complex<double>(cos(2 * i * PI / N), sin(2 * i * PI / N));
  }
}
void FFT(complex<double> p[], int n) {
  for (int i = 0; i < n; ++i) {
    if (i < bitrev[i]) {
      swap(p[i], p[bitrev[i]]);
    }
  }
  for (int d = 0; (1 << d) < n; ++d) {
    int m = 1 << d, m2 = m * 2, rm = n >> (d + 1);
    for (int i = 0; i < n; i += m2) {
      for (int j = 0; j < m; ++j) {
        complex<double> &p1 = p[i + j + m], &p2 = p[i + j];
        complex<double> t = w[rm * j] * p1;
        p1 = p2 - t;
        p2 = p2 + t;
      }
    }
  }
}
complex<double> A[N], B[N], C[N], D[N];
void mul(int a[N], int b[N], int k = N) {
  for (int i = 0; i < k; ++i) {
    A[i] = complex<double>(a[i] >> L, a[i] & MASK);
    B[i] = complex<double>(b[i] >> L, b[i] & MASK);
  }
  for (int i = k; i < N; ++i) {
    A[i] = B[i] = complex<double>(0, 0);
  }
  FFT(A, N);
  FFT(B, N);
  for (int i = 0; i < N; ++i) {
    int j = (N - i) % N;
    complex<double> da = (A[i] - conj(A[j])) * complex<double>(0, -0.5),
                    db = (A[i] + conj(A[j])) * complex<double>(0.5, 0),
                    dc = (B[i] - conj(B[j])) * complex<double>(0, -0.5),
                    dd = (B[i] + conj(B[j])) * complex<double>(0.5, 0);
    C[j] = da * dd + da * dc * complex<double>(0, 1);
    D[j] = db * dd + db * dc * complex<double>(0, 1);
  }
  FFT(C, N);
  FFT(D, N);
  for (int i = 0; i < N; ++i) {
    long long da = (long long)(C[i].imag() / N + 0.5) % MOD,
              db = (long long)(C[i].real() / N + 0.5) % MOD,
              dc = (long long)(D[i].imag() / N + 0.5) % MOD,
              dd = (long long)(D[i].real() / N + 0.5) % MOD;
    a[i] = ((dd << (L * 2)) + ((db + dc) << L) + da) % MOD;
  }
}
const int K = 30005;
int fac[K], inv[K];
int inverse(int a) {
  return a == 1 ? a : (long long)(MOD - MOD / a) * inverse(MOD % a) % MOD;
}
int binom(int n, int m) {
  return (long long)fac[n] * inv[m] % MOD * inv[n - m] % MOD;
}
int k;
int TA[N], TB[N];
int powMod(int a, int n) {
  int ret = 1;
  while (n) {
    if (n & 1) {
      ret = (long long)ret * a % MOD;
    }
    a = (long long)a * a % MOD;
    n >>= 1;
  }
  return ret;
}
void trans(int a[N], int b[N], int l) {
  for (int i = 0; i <= k; ++i) {
    TA[i] = (long long)a[i] * inv[i] % MOD *
            powMod(2, (long long)i * l % (MOD - 1)) % MOD;
    TB[i] = (long long)b[i] * inv[i] % MOD;
  }
  mul(TA, TB, k + 1);
  for (int i = 0; i <= k; ++i) {
    a[i] = (long long)TA[i] * fac[i] % MOD;
  }
}
int a[N], b[N];
int main() {
  FFTInit();
  long long n;
  cin >> n >> k;
  if (n > k) {
    puts("0");
    return 0;
  }
  fac[0] = inv[0] = 1;
  for (int i = 1; i <= k; ++i) {
    fac[i] = (long long)fac[i - 1] * i % MOD;
  }
  inv[k] = inverse(fac[k]);
  for (int i = k - 1; i >= 1; --i) {
    inv[i] = (long long)inv[i + 1] * (i + 1) % MOD;
  }
  memset(a, 0, sizeof(a));
  a[0] = 1;
  memset(b, 0, sizeof(b));
  for (int i = 1; i <= k; ++i) {
    b[i] = 1;
  }
  long long l = 1;
  while (n) {
    if (n & 1) {
      trans(a, b, l);
    }
    trans(b, b, l);
    (l <<= 1) %= (MOD - 1);
    n >>= 1;
  }
  int ans = 0;
  for (int i = 0; i <= k; ++i) {
    (ans += (long long)a[i] * binom(k, i) % MOD) %= MOD;
  }
  printf("%d\n", ans);
}