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;
struct data {
  double x, y;
  data operator+(const data &b) { return (data){x + b.x, y + b.y}; }
  data operator-(const data &b) { return (data){x - b.x, y - b.y}; }
  data operator*(const data &b) {
    return (data){x * b.x - y * b.y, x * b.y + y * b.x};
  }
} w[2][100005], A[3][100005], B[3][100005], _[100005];
int rev[100005];
const double pi = acos(-1.);
const int P = 1e9 + 7;
long long n;
int fac[30005], inv[30005], two[30005], F[30005], G[30005], tmp[30005];
int g[20][30005], ret[30005], L, i, j, k, ans, p, flag, N;
int C(int n, int m) { return 1ll * fac[n] * inv[m] % P * inv[n - m] % P; }
int Pow(int a, int b) {
  int ret = 1;
  for (; b; b >>= 1, a = 1ll * a * a % P)
    if (b & 1) ret = 1ll * ret * a % P;
  return ret;
}
inline void up(int &x) {
  if (x >= P) x -= P;
}
void FFT(data *a, int o) {
  for (int i = 0; i < N; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int i = 1; i < N; i <<= 1)
    for (int j = 0, t = N / (i << 1); j < N; j += i << 1)
      for (int k = 0, l = 0; k < i; k++, l += t) {
        data x = a[j + k + i] * w[o][l], y = a[j + k];
        a[j + k + i] = y - x;
        a[j + k] = y + x;
      }
  if (o)
    for (int i = 0; i < N; i++) a[i].x /= N;
}
inline void init(int n) {
  for (N = 1; N <= n; N <<= 1)
    ;
  N <<= 1;
  for (int i = 0; i < N; i++) {
    int x = i, &y = rev[i];
    y = 0;
    for (int k = 1; k < N; k <<= 1, x >>= 1) (y <<= 1) |= x & 1;
  }
  for (int i = 0; i < N; i++)
    w[0][i] = w[1][i] = (data){cos(2 * pi * i / N), sin(2 * pi * i / N)},
    w[1][i].y = -w[1][i].y;
}
const int S = 1002;
void CONV(int *c, int *a, int *b) {
  for (int p = 0; p < 3; p++)
    for (int i = 0; i < N; i++)
      A[p][i].x = A[p][i].y = B[p][i].x = B[p][i].y = 0;
  for (int i = 1; i <= L; i++)
    for (int xa = a[i], xb = b[i], p = 0; p < 3; p++)
      A[p][i].x = xa % S, xa /= S, B[p][i].x = xb % S, xb /= S;
  for (int p = 0; p < 3; p++) FFT(A[p], 0), FFT(B[p], 0);
  for (int i = 1; i <= L; i++) c[i] = 0;
  int base = 1;
  for (int p = 0; p < 3; p++, base = 1ll * base * S % P)
    for (int _base = base, q = 0; q < 3; q++, _base = 1ll * _base * S % P) {
      for (int i = 0; i < N; i++) _[i] = A[p][i] * B[q][i];
      FFT(_, 1);
      for (int i = 1; i <= L; i++) {
        int x = ((long long)(_[i].x + 0.499999)) % P;
        if (x < 0) x += P;
        x = 1ll * x * _base % P;
        if ((c[i] += x) >= P) c[i] -= P;
      }
    }
}
void Union(int *c, int *a, int *b, int m) {
  int Two = two[m], now = 1;
  F[0] = 0;
  for (int i = 1; i <= L; i++)
    now = 1ll * now * Two % P, F[i] = 1ll * a[i] * inv[i] % P * now % P;
  G[0] = 0;
  for (int i = 1; i <= L; i++) G[i] = 1ll * b[i] * inv[i] % P;
  CONV(tmp, F, G);
  for (int i = 1; i <= L; i++) c[i] = 1ll * tmp[i] * fac[i] % P;
}
int main() {
  scanf("%I64d%d", &n, &L);
  init(L);
  if (n > L) return puts("0"), 0;
  for (two[0] = i = 1; i <= L; i++) two[i] = two[i - 1] * 2 % P;
  for (fac[0] = i = 1; i <= L; i++) fac[i] = 1ll * fac[i - 1] * i % P;
  inv[L] = Pow(fac[L], P - 2);
  for (i = L - 1; i >= 0; i--) inv[i] = 1ll * inv[i + 1] * (i + 1) % P;
  for (i = 1; i <= L; i++) g[0][i] = 1;
  for (p = 1; (1 << p) <= n; p++) Union(g[p], g[p - 1], g[p - 1], 1 << (p - 1));
  flag = 0;
  for (--p; p >= 0; p--)
    if ((n >> p) & 1) {
      if (!flag)
        memcpy(ret, g[p], sizeof(g[p]));
      else
        Union(ret, ret, g[p], 1 << p);
      flag = 1;
    }
  for (i = 1; i <= L; i++) up(ans += 1ll * ret[i] * C(L, i) % P);
  printf("%d\n", ans);
}