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 long long Mod = 1e9 + 7;
long long add(long long a, const long long b) {
  a += b;
  if (a >= Mod) a -= Mod;
  return a;
}
long long sub(long long a, const long long b) {
  a -= b;
  if (a < 0) a += Mod;
  return a;
}
long long mul(const long long a, const long long b) {
  return (long long)a * b % Mod;
}
long long power(long long x, long long cs) {
  long long ras = 1;
  while (cs) {
    if (cs & 1) ras = mul(ras, x);
    x = mul(x, x);
    cs >>= 1;
  }
  return ras;
}
const double PI = acos(-1);
const long long L = (1 << 16), N = L + 20, S = (1 << 16) - 1;
long long lo[N], rev[N];
complex<double> g[2][N];
void init() {
  long long i;
  double sita;
  for (i = 2; i <= L; i++) lo[i] = lo[i >> 1] + 1;
  for (i = 0; i < L; i++) {
    sita = 2.0 * PI * i / L;
    g[0][i] = complex<double>(cos(sita), sin(sita));
    g[1][i] = complex<double>(cos(-sita), sin(-sita));
  }
}
void DFT(long long n, long long opt, complex<double> *w) {
  long long i, j, mws, len, mid;
  complex<double> tmp;
  mws = lo[n] - 1;
  for (i = 1; i < n; i++) {
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << mws);
  }
  for (i = 1; i < n; i++) {
    if (rev[i] < i) swap(w[rev[i]], w[i]);
  }
  for (len = 2; len <= n; len <<= 1) {
    mid = len >> 1;
    for (i = 0; i < n; i += len) {
      for (j = 0; j < mid; j++) {
        tmp = g[opt][L / len * j] * w[i + mid + j];
        w[i + mid + j] = w[i + j] - tmp;
        w[i + j] = w[i + j] + tmp;
      }
    }
  }
}
void trans(long long n, long long *a, long long *b, long long *c) {
  long long i, len;
  static complex<double> h1[N], h2[N];
  for (len = 1; len < n * 2; len <<= 1)
    ;
  memset(h1, 0, sizeof(h1));
  memset(h2, 0, sizeof(h2));
  for (i = 0; i < n; i++) {
    h1[i].real(a[i]);
    h2[i].real(b[i]);
  }
  DFT(len, 0, h1);
  DFT(len, 0, h2);
  for (i = 0; i < len; i++) h1[i] *= h2[i];
  DFT(len, 1, h1);
  for (i = 0; i < n * 2; i++) {
    h1[i] /= len;
    c[i] = floor(h1[i].real() + 0.5);
  }
}
void strans(long long n, long long *a, long long *b, long long *c) {
  long long i, len;
  static long long a1[N], a2[N], b1[N], b2[N], h[N];
  for (len = 1; len < n * 2; len <<= 1)
    ;
  memset(a1, 0, sizeof(a1));
  memset(a2, 0, sizeof(a2));
  memset(b1, 0, sizeof(b1));
  memset(b2, 0, sizeof(b2));
  for (i = 0; i < n; i++) {
    a1[i] = a[i] >> 16;
    a2[i] = a[i] & S;
    b1[i] = b[i] >> 16;
    b2[i] = b[i] & S;
  }
  for (i = 0; i < n * 2; i++) c[i] = 0;
  trans(n, a1, b1, h);
  for (i = 0; i < n * 2; i++)
    c[i] = add(c[i], mul(h[i] % Mod, (1ll << 32) % Mod));
  trans(n, a1, b2, h);
  for (i = 0; i < n * 2; i++) c[i] = add(c[i], mul(h[i] % Mod, 1 << 16));
  trans(n, a2, b1, h);
  for (i = 0; i < n * 2; i++) c[i] = add(c[i], mul(h[i] % Mod, 1 << 16));
  trans(n, a2, b2, h);
  for (i = 0; i < n * 2; i++) c[i] = add(c[i], h[i] % Mod);
}
const long long Log = 16;
long long m, n, ans = 0;
long long zp[N], fp[N], cf[N], f[Log + 3][N], a[N], b[N], t[N];
void init2() {
  long long i;
  zp[0] = fp[0] = 1;
  for (i = 1; i <= n; i++) zp[i] = mul(zp[i - 1], i);
  fp[n] = power(zp[n], Mod - 2);
  for (i = n - 1; i >= 1; i--) fp[i] = mul(fp[i + 1], i + 1);
  cf[0] = 1;
  for (i = 1; i <= n; i++) cf[i] = mul(cf[i - 1], 2);
}
long long C(long long a, long long b) {
  return mul(zp[a], mul(fp[b], fp[a - b]));
}
int main() {
  long long i, j, w;
  cin >> m >> n;
  if (m > n) {
    puts("0");
    return 0;
  }
  init();
  init2();
  for (i = 1; i <= n; i++) f[0][i] = fp[i];
  for (i = 1; i <= Log; i++) {
    w = 1;
    for (j = 0; j <= n; j++) {
      a[j] = mul(f[i - 1][j], w);
      b[j] = f[i - 1][j];
      w = mul(w, cf[(1 << (i - 1))]);
    }
    strans(n + 1, a, b, f[i]);
  }
  t[0] = 1;
  for (i = Log; i >= 0; i--) {
    if ((m & (1 << i)) == 0) continue;
    w = 1;
    for (j = 0; j <= n; j++) {
      t[j] = mul(t[j], w);
      w = mul(w, cf[1 << i]);
    }
    strans(n + 1, t, f[i], t);
  }
  for (i = 1; i <= n; i++) {
    ans = add(ans, mul(mul(t[i], zp[i]), C(n, i)));
  }
  printf("%lld", ans);
  return 0;
}