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 int NN = 1 << 16;
const double pi = acosl(-1.0);
const int N = 1 << 16, LN = __builtin_ctz(N), 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 < k; 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;
  }
}
int k;
int a[NN], b[NN], fac[NN], rev[NN], ta[NN], tb[NN];
int power(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = (long long)ans * a % MOD;
    b >>= 1;
    a = (long long)a * a % MOD;
  }
  return ans;
}
void multi(int *a, int *b, int len) {
  for (int i = 0; i <= k; i++) {
    ta[i] = (long long)a[i] * power(2, (long long)i * len % (MOD - 1)) % MOD *
            rev[i] % MOD;
    tb[i] = (long long)b[i] * rev[i] % MOD;
  }
  mul(ta, tb, k + 1);
  for (int i = 0; i <= k; i++) a[i] = (long long)ta[i] * fac[i] % MOD;
}
int main() {
  long long n;
  scanf("%I64d%d", &n, &k);
  if (n > k) return puts("0");
  for (int i = fac[0] = 1; i < NN; i++)
    fac[i] = (long long)fac[i - 1] * i % MOD;
  rev[NN - 1] = power(fac[NN - 1], MOD - 2);
  for (int i = NN - 2; i >= 0; i--)
    rev[i] = (long long)rev[i + 1] * (i + 1) % MOD;
  FFTInit();
  for (int i = 1; i <= k; i++) b[i] = 1;
  a[0] = 1;
  int len = 1;
  while (n) {
    if (n & 1) multi(a, b, len);
    multi(b, b, len);
    len <<= 1;
    n >>= 1;
  }
  int ans = 0, mid = 1;
  for (int i = 1; i <= k; i++) {
    mid = (long long)mid * (k - i + 1) % MOD * rev[i] % MOD * fac[i - 1] % MOD;
    ans = (ans + (long long)a[i] * mid) % MOD;
  }
  cout << ans << endl;
  return 0;
}