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 double PI = 3.14159265358979323846;
struct cd {
  long double real, imag;
  cd(long double x = 0, long double y = 0) {
    real = x;
    imag = y;
  }
};
inline cd operator+(const cd& a, const cd& b) {
  return cd(a.real + b.real, a.imag + b.imag);
}
inline cd operator-(const cd& a, const cd& b) {
  return cd(a.real - b.real, a.imag - b.imag);
}
inline cd operator*(const cd& a, const long double b) {
  return cd(a.real * b, a.real * b);
}
inline cd operator*(const long double b, const cd& a) {
  return cd(a.real * b, a.real * b);
}
inline cd operator*(const cd& a, const cd& b) {
  return cd(a.real * b.real - a.imag * b.imag,
            a.real * b.imag + a.imag * b.real);
}
inline cd operator/(const cd& a, const long double b) {
  return cd(a.real / b, a.imag / b);
}
int rev[400010];
void getrev(int bit) {
  for (int i = 1; i < (1 << bit); i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (bit - 1));
  return;
}
void fft(cd* a, int n, int dft) {
  for (int i = 0; i < n; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int step = 1; step < n; step <<= 1) {
    cd wn(cos(dft * PI / step), sin(dft * PI / step));
    for (int i = 0; i < n; i += step << 1) {
      cd wnk(1, 0);
      for (int j = i; j < i + step; j++) {
        cd x = a[j], y = a[j + step] * wnk;
        a[j] = x + y;
        a[j + step] = x - y;
        wnk = wnk * wn;
      }
    }
  }
  if (dft == -1) {
    for (int i = 0; i < n; i++) a[i] = a[i] / (long double)n;
  }
  return;
}
const int M = 32768;
cd ta1[400010], ta2[400010], tb1[400010], tb2[400010];
cd ret[400010];
void mul(long long* a, long long* b, long long* c, int la, int lb,
         long long P) {
  int s = 1, bit = 0;
  while (s < (la + lb - 1)) s <<= 1, bit++;
  getrev(bit);
  for (int i = 0; i < s; i++) {
    if (i < la)
      ta1[i] = cd((long double)(a[i] % M), 0),
      ta2[i] = cd((long double)(a[i] / M), 0);
    else
      ta1[i] = ta2[i] = cd(0, 0);
    if (i < lb)
      tb1[i] = cd((long double)(b[i] % M), 0),
      tb2[i] = cd((long double)(b[i] / M), 0);
    else
      tb1[i] = tb2[i] = cd(0, 0);
    c[i] = 0;
  }
  fft(ta1, s, 1);
  fft(ta2, s, 1);
  fft(tb1, s, 1);
  fft(tb2, s, 1);
  for (int i = 0; i < s; i++) ret[i] = ta1[i] * tb1[i];
  fft(ret, s, -1);
  for (int i = 0; i < s; i++)
    c[i] = (c[i] + (long long)floor(ret[i].real + 0.5) % P) % P;
  for (int i = 0; i < s; i++) ret[i] = ta1[i] * tb2[i];
  fft(ret, s, -1);
  for (int i = 0; i < s; i++)
    c[i] = (c[i] + (long long)floor(ret[i].real + 0.5) % P * M % P) % P;
  for (int i = 0; i < s; i++) ret[i] = ta2[i] * tb1[i];
  fft(ret, s, -1);
  for (int i = 0; i < s; i++)
    c[i] = (c[i] + (long long)floor(ret[i].real + 0.5) % P * M % P) % P;
  for (int i = 0; i < s; i++) ret[i] = ta2[i] * tb2[i];
  fft(ret, s, -1);
  for (int i = 0; i < s; i++)
    c[i] = (c[i] + (long long)floor(ret[i].real + 0.5) % P * M % P * M % P) % P;
  return;
}
long long fpow(long long a, long long b) {
  long long ans = 1, t = a;
  while (b) {
    if (b & 1) ans = ans * t % 1000000007;
    t = t * t % 1000000007;
    ;
    b >>= 1;
  }
  return ans;
}
long long F[200010], FF[200010];
long long tmp[200010];
long long fac[200010], inv[200010];
int main() {
  long long n;
  int k;
  cin >> n >> k;
  if (n > k) {
    puts("0");
    return 0;
  }
  fac[0] = 1;
  for (int i = 1; i <= k; i++) fac[i] = fac[i - 1] * i % 1000000007;
  inv[k] = fpow(fac[k], 1000000007 - 2);
  for (int i = k; i; i--) inv[i - 1] = inv[i] * i % 1000000007;
  F[0] = 1;
  for (int i = 1; i <= k; i++) FF[i] = inv[i];
  int a = 0, b = 1;
  while (n) {
    for (int i = 0; i <= k; i++)
      tmp[i] = FF[i] * fpow(fpow(2, b), i) % 1000000007;
    if (n & 1) {
      for (int i = 0; i <= k; i++)
        F[i] = F[i] * fpow(fpow(2, b), i) % 1000000007;
      mul(F, FF, F, k + 1, k + 1, 1000000007);
      for (int i = k + 1; i < 120000; i++) F[i] = 0;
      a += b;
    }
    mul(FF, tmp, FF, k + 1, k + 1, 1000000007);
    for (int i = k + 1; i < 120000; i++) FF[i] = 0;
    b += b;
    n >>= 1;
  }
  long long ans = 0;
  for (int i = 0; i <= k; i++)
    ans = (ans + fac[k] * inv[k - i] % 1000000007 * F[i]) % 1000000007;
  printf("%lld\n", ans);
  return 0;
}