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;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXK = 1 << 15;
const int MAXFFT = 1 << 16;
const int MOD = 1000000007;
const int BASE = 32000;
const double MYPI = acos(-1);
typedef struct Pol {
  int x[MAXK + 1];
} Pol;
int inv[MAXK];
int fact[MAXK];
int ifact[MAXK];
int ipow(int x, int n) {
  int ret = 1;
  while (true) {
    if (n & 1) ret = (long long)ret * x % MOD;
    if ((n >>= 1) == 0) return ret;
    x = (long long)x * x % MOD;
  }
}
void fft(complex<double> a[MAXFFT], int sign) {
  for (int i = 0, j = 0; i < MAXFFT - 1; ++i) {
    if (i < j) swap(a[i], a[j]);
    int m = MAXFFT / 2;
    j ^= m;
    while ((j & m) == 0) m /= 2, j ^= m;
  }
  for (int len = 1; len < MAXFFT; len <<= 1) {
    for (int off = (0); off < (len); ++off) {
      double t = MYPI * sign * off / len;
      complex<double> w(cos(t), sin(t));
      for (int i = off; i < MAXFFT; i += 2 * len) {
        complex<double> u = a[i], v = w * a[i + len];
        a[i] = u + v;
        a[i + len] = u - v;
      }
    }
  }
  if (sign == -1)
    for (int i = (0); i < (MAXFFT); ++i) a[i] /= MAXFFT;
}
void pmult(Pol &c, Pol &a, Pol &b) {
  static complex<double> A[MAXFFT], B[MAXFFT];
  for (int i = (0); i < (MAXFFT); ++i)
    A[i] = complex<double>(i < MAXK ? a.x[i] : 0, 0),
    B[i] = complex<double>(i < MAXK ? b.x[i] : 0, 0);
  fft(A, +1);
  fft(B, +1);
  for (int i = (0); i < (MAXFFT); ++i) A[i] *= B[i];
  fft(A, -1);
  for (int i = (0); i < (MAXK); ++i)
    c.x[i] = ((long long)(real(A[i]) + .5)) % MOD;
}
void pmult(Pol &a, int n2, Pol &b) {
  static Pol a0, a1, b0, b1, a01, b01, c0, c1, c01;
  int step = ipow(2, n2);
  int mlt = 1;
  for (int i = (0); i < (MAXK); ++i) {
    int x = (long long)a.x[i] * mlt % MOD;
    a0.x[i] = x % BASE;
    a1.x[i] = x / BASE;
    a01.x[i] = a0.x[i] + a1.x[i];
    mlt = (long long)mlt * step % MOD;
  }
  for (int i = (0); i < (MAXK); ++i) {
    int x = b.x[i];
    b0.x[i] = x % BASE;
    b1.x[i] = x / BASE;
    b01.x[i] = b0.x[i] + b1.x[i];
  }
  pmult(c0, a0, b0);
  pmult(c1, a1, b1);
  pmult(c01, a01, b01);
  for (int i = (0); i < (MAXK); ++i)
    a.x[i] = (c0.x[i] +
              (long long)BASE *
                  (c01.x[i] - c0.x[i] - c1.x[i] + (long long)10 * MOD) +
              (long long)BASE * BASE * c1.x[i]) %
             MOD;
}
void ppow(Pol &a, Pol &b, int n) {
  for (int i = (0); i < (MAXK); ++i) a.x[i] = i == 0 ? 1 : 0;
  static Pol c;
  for (int i = (0); i < (MAXK); ++i) c.x[i] = b.x[i];
  int cn = 1;
  while (true) {
    if (n & 1) pmult(a, cn, c);
    if ((n >>= 1) == 0) break;
    pmult(c, cn, c), cn += cn;
  }
}
long long n;
int K;
Pol h1;
Pol hn;
void run() {
  fact[0] = 1;
  for (int i = (1); i < (MAXK); ++i) fact[i] = (long long)fact[i - 1] * i % MOD;
  inv[1] = 1;
  for (int i = (2); i < (MAXK); ++i)
    inv[i] = (MOD - (long long)(MOD / i) * inv[MOD % i] % MOD) % MOD;
  ifact[0] = 1;
  for (int i = (1); i < (MAXK); ++i)
    ifact[i] = (long long)ifact[i - 1] * inv[i] % MOD;
  scanf("%I64d%d", &n, &K);
  if (n > K) {
    printf("0\n");
    return;
  }
  for (int i = (0); i < (MAXK); ++i) h1.x[i] = 1 <= i && i <= K ? ifact[i] : 0;
  ppow(hn, h1, n);
  int ret = 0;
  for (int i = (0); i <= (K); ++i) {
    int cur = (long long)hn.x[i] * fact[K] % MOD * ifact[K - i] % MOD;
    if ((ret += cur) >= MOD) ret -= MOD;
  }
  printf("%d\n", ret);
}
int main() {
  run();
  return 0;
}