#include <bits/stdc++.h>
using namespace std;
const int Max_N = 1 << 16;
const long long Mod = (1e9) + 7;
int k, bi, B, r[Max_N + 5];
long long n, modd[3] = {469762049, 998244353, 1004535809}, P[Max_N + 5],
             INVV[Max_N + 5], Pd[Max_N + 5];
struct kk {
  long long A, B, C;
} G, InvG, INV, f[Max_N + 5], g[Max_N + 5], pr[Max_N + 5], Pr[Max_N + 5],
    w[Max_N + 5];
kk operator+(kk x, kk y) {
  return {(x.A + y.A) % modd[0], (x.B + y.B) % modd[1], (x.C + y.C) % modd[2]};
}
kk operator-(kk x, kk y) {
  return {(x.A - y.A + modd[0]) % modd[0], (x.B - y.B + modd[1]) % modd[1],
          (x.C - y.C + modd[2]) % modd[2]};
}
kk operator*(kk x, kk y) {
  return {x.A * y.A % modd[0], x.B * y.B % modd[1], x.C * y.C % modd[2]};
}
inline long long Mul(long long x, long long y, long long p) {
  long long sum = 1;
  x %= p;
  for (; y; y >>= 1, x = x * x % p)
    if (y & 1) sum = sum * x % p;
  return sum;
}
long long Ma = Mul(modd[0], modd[1] - 2, modd[1]);
long long InvAB = Mul(modd[0] * modd[1], modd[2] - 2, modd[2]);
inline void Ntt(kk *a, int opt) {
  for (int i = 0; i < B; i++)
    if (i < r[i]) swap(a[i], a[r[i]]);
  for (int i = 1; i < B; i <<= 1) {
    kk en = opt ? pr[i] : Pr[i], e = {1, 1, 1};
    for (int j = 0; j < B; j += i << 1, e = {1, 1, 1})
      for (int k = j; k < j + i; k++, e = e * en) {
        kk x = a[k], y = a[k + i] * e;
        a[k] = x + y, a[k + i] = x - y;
      }
  }
  if (!opt)
    for (int i = 0; i < B; i++) a[i] = a[i] * INV;
}
inline long long Get(kk x) {
  long long a =
      (x.B - x.A % modd[1] + modd[1]) % modd[1] * Ma % modd[1] * modd[0] + x.A;
  long long b = ((x.C - a % modd[2] + modd[2]) % modd[2] * InvAB % modd[2] *
                     modd[0] % Mod * modd[1] % Mod +
                 a) %
                Mod;
  return b;
}
inline void Mult(kk *a, kk *b) {
  Ntt(a, 1);
  Ntt(b, 1);
  for (int i = 0; i < B; i++) a[i] = a[i] * b[i];
  Ntt(a, 0);
  Ntt(b, 0);
  for (int i = k + 1; i < B; i++) a[i] = b[i] = {0, 0, 0};
  for (int i = 0; i <= k; i++) {
    long long x = Get(a[i]);
    a[i] = {x, x, x};
  }
}
inline void Pre_Work() {
  for (bi = 0, B = 1; B <= (k << 1); ++bi, B <<= 1)
    ;
  for (int i = 0; i <= B; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << bi - 1);
  G.A = G.B = G.C = 3;
  InvG.A = Mul(3, modd[0] - 2, modd[0]);
  InvG.B = Mul(3, modd[1] - 2, modd[1]);
  InvG.C = Mul(3, modd[2] - 2, modd[2]);
  for (int i = 1; i <= B; i <<= 1) {
    pr[i].A = Mul(3, (modd[0] - 1) / (i << 1), modd[0]);
    pr[i].B = Mul(3, (modd[1] - 1) / (i << 1), modd[1]);
    pr[i].C = Mul(3, (modd[2] - 1) / (i << 1), modd[2]);
    Pr[i].A = Mul(InvG.A, (modd[0] - 1) / (i << 1), modd[0]);
    Pr[i].B = Mul(InvG.B, (modd[1] - 1) / (i << 1), modd[1]);
    Pr[i].C = Mul(InvG.C, (modd[2] - 1) / (i << 1), modd[2]);
  }
  INV.A = Mul(B, modd[0] - 2, modd[0]);
  INV.B = Mul(B, modd[1] - 2, modd[1]);
  INV.C = Mul(B, modd[2] - 2, modd[2]);
  g[0] = w[0] = {1, 1, 1};
  Pd[0] = 1;
  for (int i = 1; i <= B; i++) Pd[i] = Pd[i - 1] * 2 % Mod;
  for (int i = 1; i <= k; i++) {
    long long x = Mul(i, Mod - 2, Mod) * w[i - 1].A % Mod;
    w[i] = kk{x, x, x};
  }
  w[0] = {0, 0, 0};
  INVV[0] = INVV[1] = P[0] = 1;
  for (int i = 1; i <= B; i++) P[i] = P[i - 1] * i % Mod;
  for (int i = 2; i <= B; i++) INVV[i] = INVV[Mod % i] * (Mod - Mod / i) % Mod;
  for (int i = 1; i <= B; i++) INVV[i] = INVV[i] * INVV[i - 1] % Mod;
}
inline void MUL(int x) {
  if (!x) return;
  MUL(x >> 1);
  long long e = 1;
  for (int i = 0; i <= k; i++) {
    long long now = g[i].A * e % Mod;
    f[i] = {now, now, now}, e = e * Pd[x >> 1] % Mod;
  }
  Mult(g, f);
  if (x & 1) {
    for (int i = 0; i <= k; i++) {
      long long now = g[i].A * Pd[i] % Mod;
      g[i] = {now, now, now};
    }
    Mult(g, w);
  }
}
int main() {
  scanf("%lld%d", &n, &k);
  if (n > k) {
    puts("0");
    return 0;
  }
  Pre_Work();
  MUL(n);
  long long ans = 0;
  for (int i = 0; i <= k; i++) {
    long long x = Get(g[i]);
    ans = (ans +
           x * P[i] % Mod * P[k] % Mod * INVV[i] % Mod * INVV[k - i] % Mod) %
          Mod;
  }
  printf("%lld\n", ans);
  return 0;
}

### Prompt

Your task is to create a CPP solution to the following 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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int Max_N = 1 << 16;
const long long Mod = (1e9) + 7;
int k, bi, B, r[Max_N + 5];
long long n, modd[3] = {469762049, 998244353, 1004535809}, P[Max_N + 5],
             INVV[Max_N + 5], Pd[Max_N + 5];
struct kk {
  long long A, B, C;
} G, InvG, INV, f[Max_N + 5], g[Max_N + 5], pr[Max_N + 5], Pr[Max_N + 5],
    w[Max_N + 5];
kk operator+(kk x, kk y) {
  return {(x.A + y.A) % modd[0], (x.B + y.B) % modd[1], (x.C + y.C) % modd[2]};
}
kk operator-(kk x, kk y) {
  return {(x.A - y.A + modd[0]) % modd[0], (x.B - y.B + modd[1]) % modd[1],
          (x.C - y.C + modd[2]) % modd[2]};
}
kk operator*(kk x, kk y) {
  return {x.A * y.A % modd[0], x.B * y.B % modd[1], x.C * y.C % modd[2]};
}
inline long long Mul(long long x, long long y, long long p) {
  long long sum = 1;
  x %= p;
  for (; y; y >>= 1, x = x * x % p)
    if (y & 1) sum = sum * x % p;
  return sum;
}
long long Ma = Mul(modd[0], modd[1] - 2, modd[1]);
long long InvAB = Mul(modd[0] * modd[1], modd[2] - 2, modd[2]);
inline void Ntt(kk *a, int opt) {
  for (int i = 0; i < B; i++)
    if (i < r[i]) swap(a[i], a[r[i]]);
  for (int i = 1; i < B; i <<= 1) {
    kk en = opt ? pr[i] : Pr[i], e = {1, 1, 1};
    for (int j = 0; j < B; j += i << 1, e = {1, 1, 1})
      for (int k = j; k < j + i; k++, e = e * en) {
        kk x = a[k], y = a[k + i] * e;
        a[k] = x + y, a[k + i] = x - y;
      }
  }
  if (!opt)
    for (int i = 0; i < B; i++) a[i] = a[i] * INV;
}
inline long long Get(kk x) {
  long long a =
      (x.B - x.A % modd[1] + modd[1]) % modd[1] * Ma % modd[1] * modd[0] + x.A;
  long long b = ((x.C - a % modd[2] + modd[2]) % modd[2] * InvAB % modd[2] *
                     modd[0] % Mod * modd[1] % Mod +
                 a) %
                Mod;
  return b;
}
inline void Mult(kk *a, kk *b) {
  Ntt(a, 1);
  Ntt(b, 1);
  for (int i = 0; i < B; i++) a[i] = a[i] * b[i];
  Ntt(a, 0);
  Ntt(b, 0);
  for (int i = k + 1; i < B; i++) a[i] = b[i] = {0, 0, 0};
  for (int i = 0; i <= k; i++) {
    long long x = Get(a[i]);
    a[i] = {x, x, x};
  }
}
inline void Pre_Work() {
  for (bi = 0, B = 1; B <= (k << 1); ++bi, B <<= 1)
    ;
  for (int i = 0; i <= B; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << bi - 1);
  G.A = G.B = G.C = 3;
  InvG.A = Mul(3, modd[0] - 2, modd[0]);
  InvG.B = Mul(3, modd[1] - 2, modd[1]);
  InvG.C = Mul(3, modd[2] - 2, modd[2]);
  for (int i = 1; i <= B; i <<= 1) {
    pr[i].A = Mul(3, (modd[0] - 1) / (i << 1), modd[0]);
    pr[i].B = Mul(3, (modd[1] - 1) / (i << 1), modd[1]);
    pr[i].C = Mul(3, (modd[2] - 1) / (i << 1), modd[2]);
    Pr[i].A = Mul(InvG.A, (modd[0] - 1) / (i << 1), modd[0]);
    Pr[i].B = Mul(InvG.B, (modd[1] - 1) / (i << 1), modd[1]);
    Pr[i].C = Mul(InvG.C, (modd[2] - 1) / (i << 1), modd[2]);
  }
  INV.A = Mul(B, modd[0] - 2, modd[0]);
  INV.B = Mul(B, modd[1] - 2, modd[1]);
  INV.C = Mul(B, modd[2] - 2, modd[2]);
  g[0] = w[0] = {1, 1, 1};
  Pd[0] = 1;
  for (int i = 1; i <= B; i++) Pd[i] = Pd[i - 1] * 2 % Mod;
  for (int i = 1; i <= k; i++) {
    long long x = Mul(i, Mod - 2, Mod) * w[i - 1].A % Mod;
    w[i] = kk{x, x, x};
  }
  w[0] = {0, 0, 0};
  INVV[0] = INVV[1] = P[0] = 1;
  for (int i = 1; i <= B; i++) P[i] = P[i - 1] * i % Mod;
  for (int i = 2; i <= B; i++) INVV[i] = INVV[Mod % i] * (Mod - Mod / i) % Mod;
  for (int i = 1; i <= B; i++) INVV[i] = INVV[i] * INVV[i - 1] % Mod;
}
inline void MUL(int x) {
  if (!x) return;
  MUL(x >> 1);
  long long e = 1;
  for (int i = 0; i <= k; i++) {
    long long now = g[i].A * e % Mod;
    f[i] = {now, now, now}, e = e * Pd[x >> 1] % Mod;
  }
  Mult(g, f);
  if (x & 1) {
    for (int i = 0; i <= k; i++) {
      long long now = g[i].A * Pd[i] % Mod;
      g[i] = {now, now, now};
    }
    Mult(g, w);
  }
}
int main() {
  scanf("%lld%d", &n, &k);
  if (n > k) {
    puts("0");
    return 0;
  }
  Pre_Work();
  MUL(n);
  long long ans = 0;
  for (int i = 0; i <= k; i++) {
    long long x = Get(g[i]);
    ans = (ans +
           x * P[i] % Mod * P[k] % Mod * INVV[i] % Mod * INVV[k - i] % Mod) %
          Mod;
  }
  printf("%lld\n", ans);
  return 0;
}

```