#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const long long int INFLL = 0x3f3f3f3f3f3f3f3fll;
long long int getint() {
  long long int ret = 0;
  bool f = 0;
  char c;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') f ^= 1;
  while (c >= '0' && c <= '9') {
    ret = ret * 10 + c - '0';
    c = getchar();
  }
  return f ? -ret : ret;
}
using namespace std;
const int MAXN = 75536, mod = 1000000007, S = 32768;
const long double pi = acos(-1);
struct cplx {
  long double x, y;
  cplx() {}
  cplx(long double _x, long double _y = 0) {
    x = _x;
    y = _y;
  }
  cplx operator+(const cplx &r) const { return cplx(x + r.x, y + r.y); }
  cplx operator-(const cplx &r) const { return cplx(x - r.x, y - r.y); }
  cplx operator*(const cplx &r) const {
    return cplx(x * r.x - y * r.y, x * r.y + y * r.x);
  }
  void operator/=(const int n) {
    x /= n;
    y /= n;
  }
} tmp[MAXN + 10], ta[MAXN + 10], tb[MAXN + 10];
int a[MAXN + 10], ret[MAXN + 10];
int ra[MAXN + 10], rb[MAXN + 10], rt[MAXN + 10];
int modi(long double a) { return (long long int)(a + 0.5) % mod; }
int N, lgN, k;
int rev(int a) {
  int ret = 0;
  for (int i = 0; i < lgN; ++i, a >>= 1) ret = ret << 1 | (a & 1);
  return ret;
}
void FFT(cplx a[], int flag) {
  for (int i = 0; i < N; ++i) tmp[rev(i)] = a[i];
  for (int len = 2; len <= N; len <<= 1) {
    cplx w = cplx(cos(2 * pi / len), flag * sin(2 * pi / len));
    int t = len >> 1;
    for (int i = 0; i < N; i += len) {
      cplx wn = 1;
      for (int j = 0; j < t; ++j) {
        cplx x = tmp[i + j], y = wn * tmp[i + j + t];
        tmp[i + j] = x + y;
        tmp[i + j + t] = x - y;
        wn = wn * w;
      }
    }
  }
  for (int i = 0; i < N; ++i) a[i] = tmp[i];
  if (flag == -1)
    for (int i = 0; i < N; ++i) a[i] /= N;
}
int fac[MAXN + 10], inv[MAXN + 10], invfac[MAXN + 10];
int mypow(int a, int b) {
  int ret = 1;
  for (; b; b >>= 1, a = (long long int)a * a % mod)
    if (b & 1) ret = (long long int)ret * a % mod;
  return ret;
}
void multi() {
  memset(rt, 0, sizeof rt);
  for (int i = 0; i <= k; ++i) {
    ta[i] = ra[i] & (S - 1);
    tb[i] = rb[i] & (S - 1);
  }
  for (int i = k + 1; i < N; ++i) ta[i] = tb[i] = 0;
  FFT(ta, 1);
  FFT(tb, 1);
  for (int i = 0; i < N; ++i) tb[i] = tb[i] * ta[i];
  FFT(tb, -1);
  for (int i = 0; i <= k; ++i) {
    rt[i] = modi(tb[i].x);
    tb[i] = rb[i] >> 15;
  }
  for (int i = k + 1; i < N; ++i) tb[i] = 0;
  FFT(tb, 1);
  for (int i = 0; i < N; ++i) ta[i] = tb[i] * ta[i];
  FFT(ta, -1);
  for (int i = 0; i <= k; ++i) {
    rt[i] = (rt[i] + (long long int)S * modi(ta[i].x)) % mod;
    ta[i] = ra[i] >> 15;
  }
  for (int i = k + 1; i < N; ++i) ta[i] = 0;
  FFT(ta, 1);
  for (int i = 0; i < N; ++i) tb[i] = tb[i] * ta[i];
  FFT(tb, -1);
  for (int i = 0; i <= k; ++i) {
    rt[i] = (rt[i] + (long long int)S * S % mod * modi(tb[i].x)) % mod;
    tb[i] = rb[i] & (S - 1);
  }
  for (int i = k + 1; i < N; ++i) tb[i] = 0;
  FFT(tb, 1);
  for (int i = 0; i < N; ++i) tb[i] = tb[i] * ta[i];
  FFT(tb, -1);
  for (int i = 0; i <= k; ++i)
    rt[i] = (rt[i] + (long long int)S * modi(tb[i].x)) % mod;
}
void multi(int a[], int b[], int rsz) {
  int c = mypow(2, rsz), t = 1;
  for (int i = 0; i <= k; ++i) {
    ra[i] = (long long int)a[i] * invfac[i] % mod * t % mod;
    rb[i] = (long long int)b[i] * invfac[i] % mod;
    t = (long long int)t * c % mod;
  }
  multi();
  for (int i = 0; i <= k; ++i) a[i] = (long long int)fac[i] * rt[i] % mod;
}
int main() {
  long long int n = getint();
  k = getint();
  if (n > k) {
    printf("0\n");
    return 0;
  }
  fac[0] = fac[1] = 1;
  inv[1] = 1;
  invfac[0] = invfac[1] = 1;
  for (int i = 2; i <= k; ++i) {
    fac[i] = (long long int)fac[i - 1] * i % mod;
    inv[i] = (long long int)(mod - mod / i) * inv[mod % i] % mod;
    invfac[i] = (long long int)inv[i] * invfac[i - 1] % mod;
  }
  N = 1, lgN = 0;
  while (N <= (k << 1)) N <<= 1, ++lgN;
  ret[0] = 1;
  for (int i = 1; i <= k; ++i) a[i] = 1;
  int len = 1;
  for (; n; n >>= 1, multi(a, a, len), len <<= 1)
    if (n & 1) multi(ret, a, len);
  int ans = 0;
  for (int i = n; i <= k; ++i)
    ans = (ans + (long long int)fac[k] * invfac[i] % mod * invfac[k - i] % mod *
                     ret[i]) %
          mod;
  printf("%d\n", ans);
}

### Prompt

Develop a solution in CPP to the problem described below:

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>
const int INF = 0x3f3f3f3f;
const long long int INFLL = 0x3f3f3f3f3f3f3f3fll;
long long int getint() {
  long long int ret = 0;
  bool f = 0;
  char c;
  while ((c = getchar()) < '0' || c > '9')
    if (c == '-') f ^= 1;
  while (c >= '0' && c <= '9') {
    ret = ret * 10 + c - '0';
    c = getchar();
  }
  return f ? -ret : ret;
}
using namespace std;
const int MAXN = 75536, mod = 1000000007, S = 32768;
const long double pi = acos(-1);
struct cplx {
  long double x, y;
  cplx() {}
  cplx(long double _x, long double _y = 0) {
    x = _x;
    y = _y;
  }
  cplx operator+(const cplx &r) const { return cplx(x + r.x, y + r.y); }
  cplx operator-(const cplx &r) const { return cplx(x - r.x, y - r.y); }
  cplx operator*(const cplx &r) const {
    return cplx(x * r.x - y * r.y, x * r.y + y * r.x);
  }
  void operator/=(const int n) {
    x /= n;
    y /= n;
  }
} tmp[MAXN + 10], ta[MAXN + 10], tb[MAXN + 10];
int a[MAXN + 10], ret[MAXN + 10];
int ra[MAXN + 10], rb[MAXN + 10], rt[MAXN + 10];
int modi(long double a) { return (long long int)(a + 0.5) % mod; }
int N, lgN, k;
int rev(int a) {
  int ret = 0;
  for (int i = 0; i < lgN; ++i, a >>= 1) ret = ret << 1 | (a & 1);
  return ret;
}
void FFT(cplx a[], int flag) {
  for (int i = 0; i < N; ++i) tmp[rev(i)] = a[i];
  for (int len = 2; len <= N; len <<= 1) {
    cplx w = cplx(cos(2 * pi / len), flag * sin(2 * pi / len));
    int t = len >> 1;
    for (int i = 0; i < N; i += len) {
      cplx wn = 1;
      for (int j = 0; j < t; ++j) {
        cplx x = tmp[i + j], y = wn * tmp[i + j + t];
        tmp[i + j] = x + y;
        tmp[i + j + t] = x - y;
        wn = wn * w;
      }
    }
  }
  for (int i = 0; i < N; ++i) a[i] = tmp[i];
  if (flag == -1)
    for (int i = 0; i < N; ++i) a[i] /= N;
}
int fac[MAXN + 10], inv[MAXN + 10], invfac[MAXN + 10];
int mypow(int a, int b) {
  int ret = 1;
  for (; b; b >>= 1, a = (long long int)a * a % mod)
    if (b & 1) ret = (long long int)ret * a % mod;
  return ret;
}
void multi() {
  memset(rt, 0, sizeof rt);
  for (int i = 0; i <= k; ++i) {
    ta[i] = ra[i] & (S - 1);
    tb[i] = rb[i] & (S - 1);
  }
  for (int i = k + 1; i < N; ++i) ta[i] = tb[i] = 0;
  FFT(ta, 1);
  FFT(tb, 1);
  for (int i = 0; i < N; ++i) tb[i] = tb[i] * ta[i];
  FFT(tb, -1);
  for (int i = 0; i <= k; ++i) {
    rt[i] = modi(tb[i].x);
    tb[i] = rb[i] >> 15;
  }
  for (int i = k + 1; i < N; ++i) tb[i] = 0;
  FFT(tb, 1);
  for (int i = 0; i < N; ++i) ta[i] = tb[i] * ta[i];
  FFT(ta, -1);
  for (int i = 0; i <= k; ++i) {
    rt[i] = (rt[i] + (long long int)S * modi(ta[i].x)) % mod;
    ta[i] = ra[i] >> 15;
  }
  for (int i = k + 1; i < N; ++i) ta[i] = 0;
  FFT(ta, 1);
  for (int i = 0; i < N; ++i) tb[i] = tb[i] * ta[i];
  FFT(tb, -1);
  for (int i = 0; i <= k; ++i) {
    rt[i] = (rt[i] + (long long int)S * S % mod * modi(tb[i].x)) % mod;
    tb[i] = rb[i] & (S - 1);
  }
  for (int i = k + 1; i < N; ++i) tb[i] = 0;
  FFT(tb, 1);
  for (int i = 0; i < N; ++i) tb[i] = tb[i] * ta[i];
  FFT(tb, -1);
  for (int i = 0; i <= k; ++i)
    rt[i] = (rt[i] + (long long int)S * modi(tb[i].x)) % mod;
}
void multi(int a[], int b[], int rsz) {
  int c = mypow(2, rsz), t = 1;
  for (int i = 0; i <= k; ++i) {
    ra[i] = (long long int)a[i] * invfac[i] % mod * t % mod;
    rb[i] = (long long int)b[i] * invfac[i] % mod;
    t = (long long int)t * c % mod;
  }
  multi();
  for (int i = 0; i <= k; ++i) a[i] = (long long int)fac[i] * rt[i] % mod;
}
int main() {
  long long int n = getint();
  k = getint();
  if (n > k) {
    printf("0\n");
    return 0;
  }
  fac[0] = fac[1] = 1;
  inv[1] = 1;
  invfac[0] = invfac[1] = 1;
  for (int i = 2; i <= k; ++i) {
    fac[i] = (long long int)fac[i - 1] * i % mod;
    inv[i] = (long long int)(mod - mod / i) * inv[mod % i] % mod;
    invfac[i] = (long long int)inv[i] * invfac[i - 1] % mod;
  }
  N = 1, lgN = 0;
  while (N <= (k << 1)) N <<= 1, ++lgN;
  ret[0] = 1;
  for (int i = 1; i <= k; ++i) a[i] = 1;
  int len = 1;
  for (; n; n >>= 1, multi(a, a, len), len <<= 1)
    if (n & 1) multi(ret, a, len);
  int ans = 0;
  for (int i = n; i <= k; ++i)
    ans = (ans + (long long int)fac[k] * invfac[i] % mod * invfac[k - i] % mod *
                     ret[i]) %
          mod;
  printf("%d\n", ans);
}

```