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 N = 30300, P = 1000000007, D = 1001;
const double pi = acos(-1.0);
int i, j, k, K, n, m, ans;
int Jc[N], Jc_[N], left[N], right[N];
long long nn;
struct fs {
  double x, y;
  fs operator+(const fs &n) const {
    fs a;
    a.x = x + n.x;
    a.y = y + n.y;
    return a;
  }
  fs operator-(const fs &n) const {
    fs a;
    a.x = x - n.x;
    a.y = y - n.y;
    return a;
  }
  fs operator*(const fs &n) const {
    fs a;
    a.x = x * n.x - y * n.y;
    a.y = x * n.y + y * n.x;
    return a;
  }
} ta[3][N << 2], tb[3][N << 2], tc[N << 2], td[N << 2];
int rev(int x, int m) {
  int a = 0;
  while (m--) (a <<= 1) |= x & 1, x >>= 1;
  return a;
}
void FFT(fs *y, int n, int m, int fg) {
  int i, j, k, nm;
  for (i = 0; i < n; i++) tc[i] = y[i];
  for (i = 0; i < n; i++) y[i] = tc[rev(i, m)];
  fs wm, w, t, u;
  for (i = 1; i <= m; i++) {
    nm = 1 << i;
    wm.x = cos((2 * pi / (1.0 * nm)) * fg);
    wm.y = sin((2 * pi / (1.0 * nm)) * fg);
    for (k = 0; k < n; k += nm) {
      w.x = 1.0;
      w.y = 0.0;
      for (j = 0; j < nm / 2; j++) {
        t = w * y[k + j + nm / 2];
        u = y[k + j];
        y[k + j] = u + t;
        y[k + j + nm / 2] = u - t;
        w = w * wm;
      }
    }
  }
  if (fg == -1)
    for (i = 0; i < n; i++) y[i].x /= 1.0 * n;
}
int ksm(int x, int y) {
  int z = 1;
  for (; y; y >>= 1, x = 1ll * x * x % P)
    if (y & 1) z = 1ll * z * x % P;
  return z;
}
struct cc {
  int f[N];
  int len;
  cc operator^(const cc &next) const {
    if (!len) return next;
    static cc t;
    int i, j, n, nn, tt, ja, jb, da, db;
    memset(t.f, 0, sizeof t.f);
    t.len = len + next.len;
    n = (K + 1) << 1;
    nn = 0;
    while ((1 << nn) < n) nn++;
    n = 1 << nn;
    for (i = 0; i < n; i++) {
      if (1 <= i && i <= K) {
        tt = 1ll * f[i] * Jc_[i] % P * ksm(2, i * next.len) % P;
        for (j = 0; j < 3; j++) {
          ta[j][i].x = tt % D, tt /= D;
          ta[j][i].y = 0.0;
        }
      } else {
        for (j = 0; j < 3; j++) ta[j][i].x = ta[j][i].y = 0.0;
      }
    }
    for (i = 0; i < n; i++) {
      if (1 <= i && i <= K) {
        tt = 1ll * next.f[i] * Jc_[i] % P;
        for (j = 0; j < 3; j++) {
          tb[j][i].x = tt % D, tt /= D;
          tb[j][i].y = 0.0;
        }
      } else {
        for (j = 0; j < 3; j++) tb[j][i].x = tb[j][i].y = 0.0;
      }
    }
    for (j = 0; j < 3; j++) {
      FFT(ta[j], n, nn, 1);
      FFT(tb[j], n, nn, 1);
    }
    da = 1;
    for (ja = 0; ja < 3; ja++) {
      db = da;
      for (jb = 0; jb < 3; jb++) {
        for (i = 0; i < n; i++) td[i] = ta[ja][i] * tb[jb][i];
        FFT(td, n, nn, -1);
        for (i = 1; i <= K; i++) {
          long long tt = floor(td[i].x + 0.5);
          t.f[i] = (1ll * tt * db + t.f[i]) % P;
        }
        db = (1ll * db * D) % P;
      }
      da *= D;
    }
    for (i = 1; i <= K; i++) t.f[i] = 1ll * t.f[i] * Jc[i] % P;
    return t;
  }
} A, B;
void pre(int n) {
  int i;
  Jc[0] = Jc_[0] = 1;
  for (i = 1; i <= n; i++) Jc[i] = 1ll * Jc[i - 1] * i % P;
  Jc_[n] = ksm(Jc[n], P - 2);
  for (i = n - 1; i; i--) Jc_[i] = 1ll * Jc_[i + 1] * (i + 1) % P;
}
int main() {
  scanf("%I64d%d", &nn, &K);
  if (nn > K) return puts("0"), 0;
  pre(K);
  B.len = 1;
  for (i = 1; i <= K; i++) B.f[i] = 1;
  while (nn) {
    if (nn & 1) A = A ^ B;
    nn >>= 1;
    if (nn) B = B ^ B;
  }
  for (i = 1; i <= K; i++)
    ans = (1ll * A.f[i] * Jc[K] % P * Jc_[i] % P * Jc_[K - i] + ans) % P;
  printf("%d\n", ans);
}