#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
void file_io();
void PLAY();
long long power(long long b, long long n, long long MOD);
long long findlcm(vector<int> arr, int n);
int gcd(int a, int b);
long long max_subarray_sum(vector<int> A);
int lowbit[100100];
vector<int> cur(17), ans(17);
int f(int n) {
  int ans = 0;
  while (n) {
    int d = n % 2;
    if (d == 1) return ans;
    n = n >> 1;
    ans++;
  }
  return -1;
}
int main() {
  int sum, limit;
  cin >> sum >> limit;
  for (int i = 1; i <= limit; i++) {
    int tmp = f(i);
    ;
    lowbit[i] = tmp;
    cur[tmp]++;
  }
  int p = 0;
  while (sum) {
    int d = sum % 2;
    if (d == 1) {
      int need = 1 << p;
      ;
      for (int i = p; i >= 0 && need; i--) {
        if (cur[i] == 0) continue;
        int taken = min(need, (1 << i) * cur[i]);
        need -= taken;
        int tmp = taken / (1 << i);
        ans[i] += tmp;
        cur[i] -= tmp;
      }
      if (need) return cout << -1, 0;
    }
    sum = sum >> 1;
    p++;
  }
  int size = 0;
  for (int i = 0; i <= 16; i++) {
    size += ans[i];
  }
  cout << size << endl;
  for (int i = 1; i <= limit; i++) {
    if (ans[lowbit[i]]) {
      cout << i << " ";
      ans[lowbit[i]]--;
    }
  }
}
void file_io() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
void PLAY() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
}
long long max_subarray_sum(vector<int> A) {
  int n = A.size();
  vector<long long> local(n);
  long long global = A[0];
  local[0] = A[0];
  for (int i = 1; i < n; i++) {
    local[i] = max(local[i - 1] + A[i], (long long)(A[i]));
    global = max(global, local[i]);
  }
  return global;
}
long long power(long long b, long long n, long long MOD) {
  if (n < 0) return cerr << "n must be non-negative\n", 0;
  if (n == 0) return 1;
  if (n == 1) return b % MOD;
  if (n % 2 == 0) {
    b %= MOD;
    b *= b;
    b %= MOD;
    return power(b, n / 2, MOD) % MOD;
  }
  b %= MOD;
  return ((b) * (power(b * b, --n / 2, MOD) % MOD)) % MOD;
}
long long findlcm(vector<int> arr, int n) {
  long long ans = arr[0];
  for (int i = 1; i < n; i++) ans = (((arr[i] * ans)) / (gcd(arr[i], ans)));
  return ans;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}

### Prompt

In cpp, your task is to solve the following problem:

At the children's day, the child came to Picks's house, and messed his house up. Picks was angry at him. A lot of important things were lost, in particular the favorite set of Picks.

Fortunately, Picks remembers something about his set S:

  * its elements were distinct integers from 1 to limit; 
  * the value of <image> was equal to sum; here lowbit(x) equals 2k where k is the position of the first one in the binary representation of x. For example, lowbit(100102) = 102, lowbit(100012) = 12, lowbit(100002) = 100002 (binary representation). 



Can you help Picks and find any set S, that satisfies all the above conditions?

Input

The first line contains two integers: sum, limit (1 ≤ sum, limit ≤ 105).

Output

In the first line print an integer n (1 ≤ n ≤ 105), denoting the size of S. Then print the elements of set S in any order. If there are multiple answers, print any of them.

If it's impossible to find a suitable set, print -1.

Examples

Input

5 5


Output

2
4 5


Input

4 3


Output

3
2 3 1


Input

5 1


Output

-1

Note

In sample test 1: lowbit(4) = 4, lowbit(5) = 1, 4 + 1 = 5.

In sample test 2: lowbit(1) = 1, lowbit(2) = 2, lowbit(3) = 1, 1 + 2 + 1 = 4.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
void file_io();
void PLAY();
long long power(long long b, long long n, long long MOD);
long long findlcm(vector<int> arr, int n);
int gcd(int a, int b);
long long max_subarray_sum(vector<int> A);
int lowbit[100100];
vector<int> cur(17), ans(17);
int f(int n) {
  int ans = 0;
  while (n) {
    int d = n % 2;
    if (d == 1) return ans;
    n = n >> 1;
    ans++;
  }
  return -1;
}
int main() {
  int sum, limit;
  cin >> sum >> limit;
  for (int i = 1; i <= limit; i++) {
    int tmp = f(i);
    ;
    lowbit[i] = tmp;
    cur[tmp]++;
  }
  int p = 0;
  while (sum) {
    int d = sum % 2;
    if (d == 1) {
      int need = 1 << p;
      ;
      for (int i = p; i >= 0 && need; i--) {
        if (cur[i] == 0) continue;
        int taken = min(need, (1 << i) * cur[i]);
        need -= taken;
        int tmp = taken / (1 << i);
        ans[i] += tmp;
        cur[i] -= tmp;
      }
      if (need) return cout << -1, 0;
    }
    sum = sum >> 1;
    p++;
  }
  int size = 0;
  for (int i = 0; i <= 16; i++) {
    size += ans[i];
  }
  cout << size << endl;
  for (int i = 1; i <= limit; i++) {
    if (ans[lowbit[i]]) {
      cout << i << " ";
      ans[lowbit[i]]--;
    }
  }
}
void file_io() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
void PLAY() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
}
long long max_subarray_sum(vector<int> A) {
  int n = A.size();
  vector<long long> local(n);
  long long global = A[0];
  local[0] = A[0];
  for (int i = 1; i < n; i++) {
    local[i] = max(local[i - 1] + A[i], (long long)(A[i]));
    global = max(global, local[i]);
  }
  return global;
}
long long power(long long b, long long n, long long MOD) {
  if (n < 0) return cerr << "n must be non-negative\n", 0;
  if (n == 0) return 1;
  if (n == 1) return b % MOD;
  if (n % 2 == 0) {
    b %= MOD;
    b *= b;
    b %= MOD;
    return power(b, n / 2, MOD) % MOD;
  }
  b %= MOD;
  return ((b) * (power(b * b, --n / 2, MOD) % MOD)) % MOD;
}
long long findlcm(vector<int> arr, int n) {
  long long ans = arr[0];
  for (int i = 1; i < n; i++) ans = (((arr[i] * ans)) / (gcd(arr[i], ans)));
  return ans;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}

```