#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
const long long P = 1000000000 + 7;
const double PI = atan2(0, -1);
void fft(vector<complex<double> > &a, bool invert) {
  int n = (int)a.size();
  for (int i = 1, j = 0; i < n; ++i) {
    int bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    double ang = 2 * PI / len * (invert ? -1 : 1);
    complex<double> wlen(cos(ang), sin(ang));
    for (int i = 0; i < n; i += len) {
      complex<double> w(1);
      for (int j = 0; j < len / 2; ++j) {
        complex<double> u = a[i + j], v = a[i + j + len / 2] * w;
        a[i + j] = u + v;
        a[i + j + len / 2] = u - v;
        w *= wlen;
      }
    }
  }
  if (invert)
    for (int i = 0; i < n; ++i) a[i] /= n;
}
vector<long long> mul(vector<long long> a, vector<long long> b) {
  int n = 1;
  while (n < a.size() + b.size()) n *= 2;
  vector<vector<complex<double> > > ap(3, vector<complex<double> >(n)),
      bp(3, vector<complex<double> >(n));
  long long s = cbrt(P);
  for (int i = 0; i < (int)(a.size()); ++i)
    for (int j = 0; j < (int)(3); ++j) ap[j][i] = a[i] % s, a[i] /= s;
  for (int i = 0; i < (int)(b.size()); ++i)
    for (int j = 0; j < (int)(3); ++j) bp[j][i] = b[i] % s, b[i] /= s;
  for (int i = 0; i < (int)(3); ++i) fft(ap[i], 0);
  for (int i = 0; i < (int)(3); ++i) fft(bp[i], 0);
  vector<long long> res(a.size());
  for (int i = 0; i < (int)(3); ++i)
    for (int j = 0; j < (int)(3); ++j) {
      vector<complex<double> > c(n);
      for (int k = 0; k < (int)(n); ++k) c[k] = ap[i][k] * bp[j][k];
      fft(c, true);
      for (int k = 0; k < (int)(a.size()); ++k) {
        long long z = c[k].real() + 0.5;
        z %= P;
        for (int l = 0; l < (int)(i + j); ++l) z *= s, z %= P;
        res[k] += z;
        res[k] %= P;
      }
    }
  return res;
}
long long deg(long long x, long long d) {
  long long y = 1;
  d %= P - 1;
  if (d < 0) d += P - 1;
  while (d) {
    if (d & 1) y *= x, y %= P;
    x *= x, x %= P;
    d /= 2;
  }
  return y;
}
const int maxk = 50000;
long long fact[maxk];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  fact[0] = 1;
  for (int i = 1; i <= (int)(maxk - 1); ++i) fact[i] = fact[i - 1] * i % P;
  long long n, k;
  cin >> n >> k;
  if (n > k) {
    cout << 0 << '\n';
    return 0;
  }
  vector<long long> ex(k + 1);
  vector<vector<long long> > exs(20, vector<long long>(k + 1));
  for (int i = 1; i <= (int)(k); ++i) exs[0][i] = deg(fact[i], -1);
  for (int j = 0; j < (int)(19); ++j) {
    vector<long long> nex(k + 1);
    for (int i = 0; i < (int)(k + 1); ++i)
      nex[i] = exs[j][i] * deg(2, 1LL * i * (1 << j)) % P;
    exs[j + 1] = mul(exs[j], nex);
  }
  vector<long long> p(k + 1);
  for (int i = 0; i < (int)(k + 1); ++i) p[i] = deg(fact[i], -1);
  int shift = 0;
  for (int i = (int)(20) - 1; i >= 0; --i) {
    if (n >= (1 << i)) {
      vector<long long> nex(k + 1);
      for (int j = 0; j < (int)(k + 1); ++j)
        nex[j] = exs[i][j] * deg(2, 1LL * j * shift) % P;
      shift += 1 << i;
      n -= 1 << i;
      p = mul(p, nex);
    }
  }
  long long ans = p[k] * fact[k] % P;
  if (ans < 0) ans += P;
  cout << ans << '\n';
  return 0;
}

### Prompt

Generate 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;
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
const long long P = 1000000000 + 7;
const double PI = atan2(0, -1);
void fft(vector<complex<double> > &a, bool invert) {
  int n = (int)a.size();
  for (int i = 1, j = 0; i < n; ++i) {
    int bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    double ang = 2 * PI / len * (invert ? -1 : 1);
    complex<double> wlen(cos(ang), sin(ang));
    for (int i = 0; i < n; i += len) {
      complex<double> w(1);
      for (int j = 0; j < len / 2; ++j) {
        complex<double> u = a[i + j], v = a[i + j + len / 2] * w;
        a[i + j] = u + v;
        a[i + j + len / 2] = u - v;
        w *= wlen;
      }
    }
  }
  if (invert)
    for (int i = 0; i < n; ++i) a[i] /= n;
}
vector<long long> mul(vector<long long> a, vector<long long> b) {
  int n = 1;
  while (n < a.size() + b.size()) n *= 2;
  vector<vector<complex<double> > > ap(3, vector<complex<double> >(n)),
      bp(3, vector<complex<double> >(n));
  long long s = cbrt(P);
  for (int i = 0; i < (int)(a.size()); ++i)
    for (int j = 0; j < (int)(3); ++j) ap[j][i] = a[i] % s, a[i] /= s;
  for (int i = 0; i < (int)(b.size()); ++i)
    for (int j = 0; j < (int)(3); ++j) bp[j][i] = b[i] % s, b[i] /= s;
  for (int i = 0; i < (int)(3); ++i) fft(ap[i], 0);
  for (int i = 0; i < (int)(3); ++i) fft(bp[i], 0);
  vector<long long> res(a.size());
  for (int i = 0; i < (int)(3); ++i)
    for (int j = 0; j < (int)(3); ++j) {
      vector<complex<double> > c(n);
      for (int k = 0; k < (int)(n); ++k) c[k] = ap[i][k] * bp[j][k];
      fft(c, true);
      for (int k = 0; k < (int)(a.size()); ++k) {
        long long z = c[k].real() + 0.5;
        z %= P;
        for (int l = 0; l < (int)(i + j); ++l) z *= s, z %= P;
        res[k] += z;
        res[k] %= P;
      }
    }
  return res;
}
long long deg(long long x, long long d) {
  long long y = 1;
  d %= P - 1;
  if (d < 0) d += P - 1;
  while (d) {
    if (d & 1) y *= x, y %= P;
    x *= x, x %= P;
    d /= 2;
  }
  return y;
}
const int maxk = 50000;
long long fact[maxk];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  fact[0] = 1;
  for (int i = 1; i <= (int)(maxk - 1); ++i) fact[i] = fact[i - 1] * i % P;
  long long n, k;
  cin >> n >> k;
  if (n > k) {
    cout << 0 << '\n';
    return 0;
  }
  vector<long long> ex(k + 1);
  vector<vector<long long> > exs(20, vector<long long>(k + 1));
  for (int i = 1; i <= (int)(k); ++i) exs[0][i] = deg(fact[i], -1);
  for (int j = 0; j < (int)(19); ++j) {
    vector<long long> nex(k + 1);
    for (int i = 0; i < (int)(k + 1); ++i)
      nex[i] = exs[j][i] * deg(2, 1LL * i * (1 << j)) % P;
    exs[j + 1] = mul(exs[j], nex);
  }
  vector<long long> p(k + 1);
  for (int i = 0; i < (int)(k + 1); ++i) p[i] = deg(fact[i], -1);
  int shift = 0;
  for (int i = (int)(20) - 1; i >= 0; --i) {
    if (n >= (1 << i)) {
      vector<long long> nex(k + 1);
      for (int j = 0; j < (int)(k + 1); ++j)
        nex[j] = exs[i][j] * deg(2, 1LL * j * shift) % P;
      shift += 1 << i;
      n -= 1 << i;
      p = mul(p, nex);
    }
  }
  long long ans = p[k] * fact[k] % P;
  if (ans < 0) ans += P;
  cout << ans << '\n';
  return 0;
}

```