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>
#pragma GCC target("avx")
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
using namespace std;
long long n, K, logn[4 * 30003 + 1], rev[4 * 30003 + 1], w[30003 + 1],
    jc[30003 + 1], njc[30003 + 1], pw2[70 * 30003 + 1], pw21[30003 + 1], ans;
long long Pm[4] = {0, 469762049, 998244353, 1004535809};
struct poly {
  long long a[4 * 30003 + 1];
} g[17], p0, p1, ap[5];
long long qread() {
  long long nans = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') nans = nans * 10 + c - '0', c = getchar();
  return nans;
}
long long ksm(long long x, long long y) {
  long long nans = 1;
  for (; y; y >>= 1, x = x * x % 1000000007)
    if (y & 1) nans = nans * x % 1000000007;
  return nans;
}
long long ksm1(long long x, long long y, long long np) {
  long long nans = 1;
  for (; y; y >>= 1, x = x * x % np)
    if (y & 1) nans = nans * x % np;
  return nans;
}
long long ksa(long long x, long long y, long long np) {
  long long nans = 0;
  for (; y; y >>= 1, x = 2 * x % np)
    if (y & 1) nans += x, nans %= np;
  return nans;
}
long long qny(long long x) { return ksm(x, 1000000007 - 2); }
long long C(long long x, long long y) {
  if (y > x || y < 0) return 0;
  return jc[x] * njc[y] % 1000000007 * njc[x - y] % 1000000007;
}
long long nat(long long x) { return (1 << (logn[x - 1] + 1)); }
void dft(poly& x, long long len, long long nfl, long long npp) {
  for (long long i = 0; i < len; i++) {
    rev[i] = rev[i >> 1] >> 1;
    if (i & 1) rev[i] |= (len >> 1);
  }
  for (long long i = 0; i < len; i++)
    if (i < rev[i]) swap(x.a[i], x.a[rev[i]]);
  for (long long i = 2; i <= len; i *= 2) {
    long long ni = ksm1(3, (Pm[npp] - 1) / i, Pm[npp]);
    if (nfl == -1) ni = ksm1(ni, Pm[npp] - 2, Pm[npp]);
    for (long long j = 0; j < len; j += i) {
      long long nt = 1;
      for (long long k = j; k < j + i / 2; k++) {
        long long np = x.a[k], nq = x.a[k + i / 2];
        x.a[k] = np + nt * nq, x.a[k] %= Pm[npp];
        x.a[k + i / 2] = np - nt * nq % Pm[npp] + Pm[npp],
                    x.a[k + i / 2] %= Pm[npp];
        nt = nt * ni % Pm[npp];
      }
    }
  }
  if (nfl == -1)
    for (long long i = 0, ni = ksm1(len, Pm[npp] - 2, Pm[npp]); i < len; i++)
      x.a[i] *= ni, x.a[i] %= Pm[npp];
}
void fft(poly& x, long long xlen, poly y, long long ylen, long long np) {
  long long nn = nat(xlen + ylen);
  for (long long i = xlen; i <= nn; i++) x.a[i] = 0;
  for (long long i = ylen; i <= nn; i++) y.a[i] = 0;
  dft(x, nn, 1, np), dft(y, nn, 1, np);
  for (long long i = 0; i < nn; i++) x.a[i] *= y.a[i], x.a[i] %= Pm[np];
  dft(x, nn, -1, np);
}
void ant(poly& x, long long xlen, poly y, long long ylen) {
  for (long long i = 1; i <= 3; i++) ap[i] = x, fft(ap[i], xlen, y, ylen, i);
  long long np = Pm[1] * Pm[2], i1 = ksm1(Pm[2], Pm[1] - 2, Pm[1]),
            i2 = ksm1(Pm[1], Pm[2] - 2, Pm[2]);
  long long i4 = ksm1(Pm[2], Pm[3] - 2, Pm[3]),
            i3 = ksm1(Pm[1], Pm[3] - 2, Pm[3]);
  for (long long i = 0; i < xlen; i++) {
    long long na =
        ksa(ap[1].a[i], Pm[2] * i1, np) + ksa(ap[2].a[i], Pm[1] * i2, np);
    na %= np;
    long long nb =
        (ap[3].a[i] - na % Pm[3] + Pm[3]) % Pm[3] * i4 % Pm[3] * i3 % Pm[3];
    x.a[i] = (np % 1000000007 * nb % 1000000007 + na) % 1000000007;
  }
}
void ycl() {
  for (long long i = 2; i <= 4 * 30003; i++) logn[i] = logn[i / 2] + 1;
  jc[0] = njc[0] = pw2[0] = pw21[0] = 1;
  for (long long i = 1; i <= 30003; i++)
    jc[i] = jc[i - 1] * i % 1000000007,
    pw21[i] = pw21[i - 1] * 2 % (1000000007 - 1);
  njc[30003] = qny(jc[30003]);
  for (long long i = 30003 - 1; i >= 1; i--)
    njc[i] = njc[i + 1] * (i + 1) % 1000000007;
}
void calg() {
  p0.a[0] = jc[K];
  for (long long i = 1; i <= K; i++) g[0].a[i] = njc[i];
  for (long long i = 1; i <= 15; i++) {
    p1 = g[i - 1], g[i] = g[i - 1];
    for (long long j = 0; j <= K; j++)
      p1.a[j] *= ksm(2, pw21[i - 1] * j % (1000000007 - 1)),
          p1.a[j] %= 1000000007;
    ant(g[i], K + 1, p1, K + 1);
  }
}
signed main() {
  ycl();
  cin >> n >> K;
  if (n > K) {
    cout << 0 << endl;
    return 0;
  }
  calg();
  for (long long i = 15; i >= 0; i--) {
    if (n & (1 << i)) {
      for (long long j = 0; j <= K; j++)
        p0.a[j] = p0.a[j] * ksm(2, pw21[i] * j % (1000000007 - 1)) % 1000000007;
      ant(p0, K + 1, g[i], K + 1);
    }
  }
  for (long long i = 0; i <= K; i++)
    ans += p0.a[i] * njc[K - i], ans %= 1000000007;
  cout << ans << endl;
  return 0;
}