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;
namespace FastFourierTransform {
const int MAXSIZE = 120005;
const int MOD = 1e9 + 7;
const int SQ_MOD = sqrt(MOD);
const long double PI = acos(-1L);
long double aReal[MAXSIZE], aImaginary[MAXSIZE];
long double bReal[MAXSIZE], bImaginary[MAXSIZE];
int bswap(int n) {
  int ret = 0;
  for (int i = 0; i < 32; ++i) {
    if (n & (1 << i)) {
      ret |= 1 << 32 - i - 1;
    }
  }
  return ret;
}
void fft(long double a[], long double b[], int n, bool invert) {
  int shift = 32 - __builtin_ctz(n);
  for (int i = 1; i < n; ++i) {
    int j = bswap(i << shift);
    if (i < j) {
      swap(a[i], a[j]);
      swap(b[i], b[j]);
    }
  }
  for (int len = 2; len <= n; len <<= 1) {
    int halfLen = len >> 1;
    long double angle = 2 * PI / len * (invert ? -1 : 1);
    long double wLenA = cos(angle);
    long double wLenB = sin(angle);
    for (int i = 0; i < n; i += len) {
      long double wA = 1;
      long double wB = 0;
      for (int j = 0; j < halfLen; j++) {
        long double uA = a[i + j];
        long double uB = b[i + j];
        long double vA = a[i + j + halfLen] * wA - b[i + j + halfLen] * wB;
        long double vB = a[i + j + halfLen] * wB + b[i + j + halfLen] * wA;
        a[i + j] = uA + vA;
        b[i + j] = uB + vB;
        a[i + j + halfLen] = uA - vA;
        b[i + j + halfLen] = uB - vB;
        long double nextWA = wA * wLenA - wB * wLenB;
        wB = wA * wLenB + wB * wLenA;
        wA = nextWA;
      }
    }
  }
  if (invert) {
    for (int i = 0; i < n; i++) {
      a[i] /= n;
      b[i] /= n;
    }
  }
}
int highestOneBit(int n) {
  while ((n & (n - 1)) != 0) {
    n &= n - 1;
  }
  return n;
}
int multiply(int64_t a[], int64_t b[], int n) {
  int m = highestOneBit(n - 1) << 2;
  m = max(m, 2);
  memset(aReal, 0, sizeof aReal);
  memset(aImaginary, 0, sizeof aImaginary);
  memset(bReal, 0, sizeof bReal);
  memset(bImaginary, 0, sizeof bImaginary);
  for (int i = 0; i < n; ++i) {
    aReal[i] = a[i];
    bReal[i] = b[i];
  }
  fft(aReal, aImaginary, m, false);
  fft(bReal, bImaginary, m, false);
  for (int i = 0; i < m; ++i) {
    long double real = aReal[i] * bReal[i] - aImaginary[i] * bImaginary[i];
    aImaginary[i] = aImaginary[i] * bReal[i] + bImaginary[i] * aReal[i];
    aReal[i] = real;
  }
  fft(aReal, aImaginary, m, true);
  for (int i = 0; i < m; ++i) {
    a[i] = int64_t(aReal[i] + 0.5);
  }
  return m;
}
int64_t aux1[MAXSIZE], aux2[MAXSIZE], aux3[MAXSIZE], aux4[MAXSIZE];
int64_t sum1[MAXSIZE], sum2[MAXSIZE], sum3[MAXSIZE], sum4[MAXSIZE];
void modMultiply(int64_t a[], int64_t b[], int n) {
  memset(aux1, 0, sizeof aux1);
  memset(aux2, 0, sizeof aux2);
  memset(aux3, 0, sizeof aux3);
  memset(aux4, 0, sizeof aux4);
  for (int i = 0; i < n; ++i) {
    aux1[i] = a[i] % SQ_MOD;
    aux2[i] = a[i] / SQ_MOD;
    aux3[i] = b[i] % SQ_MOD;
    aux4[i] = b[i] / SQ_MOD;
  }
  memcpy(sum1, aux1, sizeof sum1);
  memcpy(sum2, aux1, sizeof sum2);
  memcpy(sum3, aux2, sizeof sum1);
  memcpy(sum4, aux2, sizeof sum2);
  multiply(sum1, aux3, n);
  multiply(sum2, aux4, n);
  multiply(sum3, aux3, n);
  multiply(sum4, aux4, n);
  for (int i = 0; i < n; ++i) {
    a[i] = sum1[i] % MOD;
    a[i] += (sum2[i] + sum3[i]) % MOD * SQ_MOD % MOD;
    a[i] += sum4[i] % MOD * SQ_MOD % MOD * SQ_MOD % MOD;
    a[i] %= MOD;
  }
}
}  // namespace FastFourierTransform
namespace Normal {
const int MAXSIZE = 120005;
int64_t c[MAXSIZE];
void multiply(int64_t a[], int64_t b[], int n) {
  memset(c, 0, sizeof c);
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j <= i; ++j) {
      c[i] += a[j] * b[i - j];
    }
  }
  for (int i = 0; i <= n; ++i) a[i] = c[i];
}
}  // namespace Normal
const int KMAX = 120005, MOD = 1e9 + 7;
int64_t dp1[KMAX], dp2[KMAX];
int64_t dpAdd[KMAX];
int fact[KMAX], invFact[KMAX];
int Pow(int x, int y) {
  int ret = 1;
  for (; y > 0; y >>= 1) {
    if (y & 1) ret = (int64_t)ret * x % MOD;
    x = (int64_t)x * x % MOD;
  }
  return ret;
}
int invmod(int x) { return Pow(x, MOD - 2); }
void solve(int n, int k) {
  if (n == 1) {
    for (int i = 1; i <= k; ++i) {
      dp1[i] = 1;
    }
  } else if (n % 2 == 1) {
    solve(n - 1, k);
    int pw2 = 1;
    for (int i = 0; i <= k; ++i) {
      dp1[i] *= invFact[i];
      dp1[i] %= MOD;
      dp1[i] *= pw2;
      dp1[i] %= MOD;
      if (dp1[i] < 0) dp1[i] += MOD;
      pw2 = pw2 * 2 % MOD;
    }
    FastFourierTransform::modMultiply(dp1, dpAdd, k + 1);
    for (int i = 0; i <= k; ++i) {
      dp1[i] %= MOD;
      dp1[i] *= fact[i];
      dp1[i] %= MOD;
    }
  } else {
    solve(n / 2, k);
    memcpy(dp2, dp1, sizeof dp2);
    int pw2 = 1, ml = Pow(2, n / 2);
    for (int i = 0; i <= k; ++i) {
      dp1[i] *= invFact[i];
      dp1[i] %= MOD;
      dp1[i] *= pw2;
      dp1[i] %= MOD;
      if (dp1[i] < 0) dp1[i] += MOD;
      pw2 = (int64_t)pw2 * ml % MOD;
    }
    for (int i = 0; i <= k; ++i) {
      dp2[i] *= invFact[i];
      dp2[i] %= MOD;
      if (dp2[i] < 0) dp1[i] += MOD;
    }
    FastFourierTransform::modMultiply(dp1, dp2, k + 1);
    for (int i = 0; i <= k; ++i) {
      dp1[i] %= MOD;
      dp1[i] *= fact[i];
      dp1[i] %= MOD;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  int64_t n;
  int k;
  cin >> n >> k;
  if (n > k) {
    cout << "0\n";
    return 0;
  }
  fact[0] = 1;
  for (int i = 1; i <= k; ++i) {
    fact[i] = (int64_t)fact[i - 1] * i % MOD;
  }
  invFact[k] = invmod(fact[k]);
  for (int i = k - 1; i >= 0; --i) {
    invFact[i] = (int64_t)invFact[i + 1] * (i + 1) % MOD;
  }
  for (int i = 1; i <= k; ++i) {
    dpAdd[i] = invFact[i];
  }
  solve(n, k);
  int ans = 0;
  for (int i = 1; i <= k; ++i) {
    int64_t add = dp1[i] * fact[k] % MOD;
    add = add * invFact[i] % MOD;
    add = add * invFact[k - i] % MOD;
    ans = (ans + add) % MOD;
  }
  if (ans < 0) ans += MOD;
  cout << ans << '\n';
}