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 int inf = (int)1.01e9;
const double eps = 1e-9;
const int mod = (int)1e9 + 7;
int mpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = (res * (long long)a) % mod;
    a = (a * (long long)a) % mod;
    b >>= 1;
  }
  return res;
}
inline int rev(int a, int m = mod) {
  if (a == 1) return 1;
  return m + (1 - rev(m % a, a) * (long long)m) / a;
}
struct num {
  double x, y;
  num() {}
  num(double xx, double yy) : x(xx), y(yy) {}
};
inline num operator+(const num& a, const num& b) {
  return num(a.x + b.x, a.y + b.y);
}
inline num operator-(const num& a, const num& b) {
  return num(a.x - b.x, a.y - b.y);
}
inline num operator*(const num& a, const num& b) {
  return num(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}
const int BASE = 16;
const int T = 1 << BASE;
int revv[T];
num roots[T];
void fft(num* a, num* f) {
  for (int i = 0; (i) < (T); ++i) f[i] = a[revv[i]];
  for (int k = 1; k < T; k <<= 1)
    for (int i = 0; i < T; i += 2 * k)
      for (int j = 0; (j) < (k); ++j) {
        num z = f[i + j + k] * roots[j + k];
        f[i + j + k] = f[i + j] - z;
        f[i + j] = f[i + j] + z;
      }
}
const double PI = acos(-1);
inline num conj(num a) { return num(a.x, -a.y); }
void precalc() {
  for (int i = 1; i < T; ++i)
    revv[i] = (revv[i >> 1] >> 1) + ((i & 1) << (BASE - 1));
  int TT = T >> 1;
  for (int i = 0; (i) < (TT); ++i)
    roots[TT + i] = num(cos(2 * i * PI / T), sin(2 * i * PI / T));
  for (int i = TT - 1; i >= 1; --i) roots[i] = roots[2 * i];
}
int a[T];
int b[T];
int c[T];
num w[T], z[T];
void magic() {
  for (int i = 0; (i) < (T); ++i) w[i] = num(a[i], b[i]);
  fft(w, z);
  for (int i = 0; (i) < (T); ++i) {
    int j = (T - i) & (T - 1);
    w[i] = (z[j] * z[j] - conj(z[i] * z[i])) * num(0, -0.25 / T);
  }
  fft(w, z);
  for (int i = 0; (i) < (T); ++i) c[i] = ((long long)(z[i].x + 0.5)) % mod;
}
const int maxn = (int)1e5 + 10;
int N;
int SQRT = 31000;
int A[maxn];
int B[maxn];
int C[maxn];
int tmp[maxn];
void mult() {
  memset(C, 0, sizeof C);
  memset(a, 0, sizeof a);
  memset(b, 0, sizeof b);
  for (int i = 0; (i) < (N); ++i) a[i] = A[i] % SQRT;
  for (int i = 0; (i) < (N); ++i) b[i] = B[i] % SQRT;
  magic();
  for (int i = 0; (i) < (N); ++i) C[i] = (C[i] + c[i]) % mod;
  for (int i = 0; (i) < (N); ++i) b[i] = B[i] / SQRT;
  magic();
  for (int i = 0; (i) < (N); ++i) C[i] = (C[i] + c[i] * (long long)SQRT) % mod;
  for (int i = 0; (i) < (N); ++i) a[i] = A[i] / SQRT;
  magic();
  for (int i = 0; (i) < (N); ++i)
    C[i] = (C[i] + c[i] * (long long)SQRT * SQRT) % mod;
  for (int i = 0; (i) < (N); ++i) b[i] = B[i] % SQRT;
  magic();
  for (int i = 0; (i) < (N); ++i) C[i] = (C[i] + c[i] * (long long)SQRT) % mod;
}
int d[maxn];
int fact[maxn];
int rfact[maxn];
void multdd(int shift) {
  for (int i = 0; (i) < (N); ++i) A[i] = d[i];
  for (int i = 0; (i) < (N); ++i)
    B[i] = (d[i] * (long long)mpow(2, shift * i)) % mod;
  mult();
  for (int i = 0; (i) < (N); ++i) d[i] = C[i];
}
void multd1() {
  for (int i = 0; (i) < (N); ++i) A[i] = d[i] * (long long)mpow(2, i) % mod;
  for (int i = 0; (i) < (N); ++i) B[i] = rfact[i];
  B[0] = 0;
  mult();
  for (int i = 0; (i) < (N); ++i) d[i] = C[i];
}
int main() {
  precalc();
  long long n;
  int k;
  scanf("%I64d%d", &n, &k);
  if (n > k) {
    return 0 * printf("0\n");
  }
  N = k + 1;
  fact[0] = 1;
  for (int i = 1; i < N; ++i) fact[i] = (fact[i - 1] * (long long)i) % mod;
  for (int i = 0; (i) < (N); ++i) rfact[i] = rev(fact[i]);
  d[0] = 1;
  for (int i = 15; i >= 0; --i) {
    multdd(n >> (i + 1));
    if (n & (1LL << (i))) multd1();
  }
  int res = 0;
  for (int i = n; i <= k; ++i)
    res = (res + d[i] * (long long)fact[k] % mod * rfact[k - i]) % mod;
  printf("%d\n", res);
  return 0;
}