Problem: In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend the remaining time wisely.

Lesha knows that today he can study for at most a hours, and he will have b hours to study tomorrow. Note that it is possible that on his planet there are more hours in a day than on Earth. Lesha knows that the quality of his knowledge will only depend on the number of lecture notes he will read. He has access to an infinite number of notes that are enumerated with positive integers, but he knows that he can read the first note in one hour, the second note in two hours and so on. In other words, Lesha can read the note with number k in k hours. Lesha can read the notes in arbitrary order, however, he can't start reading a note in the first day and finish its reading in the second day.

Thus, the student has to fully read several lecture notes today, spending at most a hours in total, and fully read several lecture notes tomorrow, spending at most b hours in total. What is the maximum number of notes Lesha can read in the remaining time? Which notes should he read in the first day, and which — in the second?

Input

The only line of input contains two integers a and b (0 ≤ a, b ≤ 10^{9}) — the number of hours Lesha has today and the number of hours Lesha has tomorrow.

Output

In the first line print a single integer n (0 ≤ n ≤ a) — the number of lecture notes Lesha has to read in the first day. In the second line print n distinct integers p_1, p_2, …, p_n (1 ≤ p_i ≤ a), the sum of all p_i should not exceed a.

In the third line print a single integer m (0 ≤ m ≤ b) — the number of lecture notes Lesha has to read in the second day. In the fourth line print m distinct integers q_1, q_2, …, q_m (1 ≤ q_i ≤ b), the sum of all q_i should not exceed b.

All integers p_i and q_i should be distinct. The sum n + m should be largest possible.

Examples

Input

3 3


Output

1
3 
2
2 1 

Input

9 12


Output

2
3 6
4
1 2 4 5

Note

In the first example Lesha can read the third note in 3 hours in the first day, and the first and the second notes in one and two hours correspondingly in the second day, spending 3 hours as well. Note that Lesha can make it the other way round, reading the first and the second notes in the first day and the third note in the second day.

In the second example Lesha should read the third and the sixth notes in the first day, spending 9 hours in total. In the second day Lesha should read the first, second fourth and fifth notes, spending 12 hours in total.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct point {
  long double x, y;
  point() {
    x = 0;
    y = 0;
  }
  point(long long a, long long b) {
    x = a;
    y = b;
  }
  bool operator==(const point &b) { return x == b.x and y == b.y; }
  bool operator>(const point &b) {
    if (x > b.x) return true;
    if (x < b.x) return false;
    if (x == b.x) {
      if (y < b.y) return false;
      if (y > b.y) return true;
      return true;
    }
  }
  bool operator<(point &b) { return (b > point(x, y)); }
  point(long double x1, long double y1) {
    x = x1;
    y = y1;
  }
  long double dist(point b) {
    return sqrt((b.x - x) * (b.x - x) + (y - b.y) * (y - b.y));
  }
  long double dist_kv(point b) {
    return ((b.x - x) * (b.x - x) + (y - b.y) * (y - b.y));
  }
  bool point_on_sig(point &a, point &b) {
    return abs(a.dist(b) - (dist(a) + dist(b))) <= 1e-6;
  }
  long double polar_angle() {
    long double alpha = atan2(y, x);
    long double pi = 3.141592654;
    if (alpha < 0) alpha += 2 * pi;
    return alpha;
  }
};
struct line {
  long double A, B, C;
  line() {
    A = 0;
    B = 0;
    C = 0;
  }
  line(point &a, point &b) {
    A = a.y - b.y;
    B = b.x - a.x;
    C = -A * a.x - B * a.y;
  }
  line(long double a, long double b, long double c) {
    A = a;
    B = b;
    C = c;
  }
  line line_perp_dan_cherez_point(point a) {
    return line(-B, A, -(A * a.y) + B * a.x);
  }
  bool onli(point a) { return A * a.x + B * a.y + C == 0; }
  point intersect_lines(line &a) {
    point p;
    p.x = -(((C * a.B) - (a.C * B)) / ((A * a.B) - (a.A * B)));
    p.y = -(((A * a.C) - (a.A * C)) / ((A * a.B) - (a.A * B)));
    return p;
  }
  bool intersect(line &b) { return A * b.B - B * b.A != 0; }
  bool operator==(line &a) { return A == a.A && B == a.B && C == a.C; }
  long double distance_perpendicular(point &d) {
    return abs(A * d.x + B * d.y + C) / (sqrt(A * A + B * B));
  }
};
struct vc {
  long double x, y;
  vc() {
    x = 0;
    y = 0;
  }
  vc(long double x_, long double y_) {
    x = x_;
    y = y_;
  }
  vc(const point &a) {
    x = a.x;
    y = a.y;
  }
  vc minus(const vc &b) { return vc(x - b.x, y - b.y); }
  long double len() { return sqrt(x * x + y * y); }
  long double scalar(const vc &b) { return x * b.x + y * b.y; }
  long double vector(const vc &b) { return x * b.y - y * b.x; }
  long double angle(const vc &b) { return atan2(vector(b), scalar(b)); }
};
vector<int> top;
void top_sort(int v, vector<int> nodes[], int used[], int colors[]) {
  if (colors[v] == 1) {
    cout << -1;
    exit(0);
  } else if (colors[v] == 0)
    colors[v] = 1;
  for (int i = 0; i < nodes[v].size(); ++i) {
    if (used[nodes[v][i]] == 0) top_sort(nodes[v][i], nodes, used, colors);
  }
  top.push_back(v + 1);
  used[v] = 1;
  colors[v] = 2;
}
vector<int> z_function(string s) {
  vector<int> z(s.size());
  for (int i = 1, l = 0, r = 0; i < s.size(); ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < s.size() && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
vector<int> p_function(string s) {
  vector<int> p(s.size());
  for (int i = 1; i < s.size(); ++i) {
    int j = p[i - 1];
    while (j > 0 && s[i] != s[j]) j = p[j - 1];
    if (s[i] == s[j]) ++j;
    p[i] = j;
  }
  return p;
}
vector<int> now_ans;
void dfsik(int v, vector<int> nodes[], int colors[], int turn) {
  if (colors[v] == 1) {
    now_ans.push_back(0);
    return;
  } else if (colors[v] == 0)
    colors[v] = 1;
  for (int i = 0; i < nodes[v].size(); ++i) {
    if (turn == 1)
      dfsik(nodes[v][i], nodes, colors, 2);
    else
      dfsik(nodes[v][i], nodes, colors, 1);
  }
  if (nodes[v].empty()) {
    now_ans.push_back(turn);
    return;
  }
  colors[v] = 2;
}
long long INF = (long long)1e20;
int int_INF = (int)1e20;
long long t[8 * 100000];
long long ad[8 * 100000];
bool us[8 * 100000];
void build(long long v, long long l, long long r, vector<long long> &a) {
  if (l == r - 1) {
    t[v] = a[l];
    return;
  }
  long long mid = (l + r) / 2;
  build(v * 2, l, mid, a);
  build(v * 2 + 1, mid, r, a);
  t[v] = min(t[2 * v], t[2 * v + 1]);
}
long long mini(long long v, long long l, long long r, long long lf,
               long long rf) {
  if (lf <= l and rf >= r) {
    return t[v];
  }
  if (l >= rf or r <= lf) {
    return INF;
  }
  long long mid = (l + r) / 2;
  return min(mini(v * 2, l, mid, lf, rf), mini(v * 2 + 1, mid, r, lf, rf));
}
void push(long long v, long long l, long long r) {
  if (l == r - 1) {
    ad[2 * v] += ad[v];
    ad[2 * v + 1] += ad[v];
  }
  t[v] += ad[v];
  ad[v] = 0;
}
void push_s(long long v, long long l, long long r) {
  if (!us[v]) return;
  if (l == r - 1) {
    ad[2 * v] += ad[v];
    ad[2 * v + 1] += ad[v];
  }
  t[v] = ad[v];
  ad[v] = 0;
}
void add(long long v, long long l, long long r, long long lf, long long rf,
         long long x) {
  push(v, l, r);
  if (l >= lf and r <= rf) {
    ad[v] += x;
    push(v, l, r);
    return;
  }
  if (l >= rf or r <= lf) return;
  long long mid = (l + r) / 2;
  add(2 * v, l, mid, lf, rf, x);
  add(2 * v + 1, mid, r, lf, rf, x);
  t[v] = min(t[2 * v], t[2 * v + 1]);
}
void sett(long long v, long long l, long long r, long long lf, long long rf,
          long long x) {
  push_s(v, l, r);
  if (l >= lf and r <= rf) {
    ad[v] += x;
    push_s(v, l, r);
    return;
  }
  if (l >= rf or r <= lf) return;
  long long mid = (l + r) / 2;
  add(2 * v, l, mid, lf, rf, x);
  add(2 * v + 1, mid, r, lf, rf, x);
  t[v] = min(t[2 * v], t[2 * v + 1]);
}
int parents[500000];
void create(int v) { parents[v] = v; }
int find_parent(int v) {
  if (v == parents[v]) return v;
  return parents[v] = find_parent(parents[v]);
}
void join(int a, int b) {
  int x = find_parent(a);
  int y = find_parent(b);
  if (x != y) {
    parents[x] = y;
  }
}
vector<long long> manac(string s, int shift) {
  long long l = 0;
  long long r = -1;
  long long n = s.size();
  vector<long long> ans(n);
  for (int i = 1; i < n; i++) {
    long long k = 0;
    if (i <= r) {
      k = min(r - i + shift, ans[r - i + l + shift]);
    }
    while (i - k - 1 >= 0 && i + k + 1 - shift < n &&
           s[i - k - 1] == s[i + k + 1 - shift]) {
      k++;
    }
    if (i + k - shift > r) {
      l = i - k;
      r = i + k - shift;
    }
    ans[i] = k;
  }
  return ans;
}
vector<int> dividers(int x) {
  vector<int> ans;
  ans.push_back(x);
  for (int i = 2; i <= sqrt(x); ++i) {
    if (x % i == 0) {
      ans.push_back(i);
      if (i != sqrt(x)) ans.push_back(x / i);
    }
  }
  return ans;
}
long long max_arr(long long arr[], long long n) {
  long long maxi = -INF;
  for (int i = 0; i < n; ++i) maxi = max(maxi, arr[i]);
  return maxi;
}
long long min_arr(long long arr[], long long n) {
  long long maxi = INF;
  for (int i = 0; i < n; ++i) maxi = min(maxi, arr[i]);
  return maxi;
}
struct triple {
  long long a, b, c;
  triple(long long x, long long y, long long z) {
    a = x;
    b = y;
    c = z;
  }
  triple() {
    a = 0;
    b = 0;
    c = 0;
  }
  bool operator<(const triple *x) { return a < x->a; }
  bool operator==(const triple *x) {
    return a == x->a and b == x->b and c == x->c;
  }
  bool operator>(const triple *x) { return a > x->a; }
};
bool f(int a, int i) { return ((a >> i) & 1); }
long long mex(vector<long long> &kek) {
  vector<long long> cnt(kek.size() + 100);
  for (int i = 0; i < kek.size(); ++i) {
    ++cnt[kek[i]];
  }
  for (int i = 0; i < cnt.size(); ++i) {
    if (cnt[i] == 0) return i;
  }
}
int main() {
  long long a, b;
  cin >> a >> b;
  long long l = 0, r = a + b, ans = -1;
  while (l <= r) {
    long long m = (l + r) / 2;
    long long now1 = a, now2 = b, now = 0;
    bool can = true;
    for (long long i = m; i > 0; --i) {
      if (max(now1, now2) < i) {
        can = false;
        break;
      }
      if (now1 > now2) {
        now1 -= i;
      } else
        now2 -= i;
      ++now;
    }
    if (can) {
      ans = max(ans, now);
      l = m + 1;
    } else
      r = m - 1;
  }
  long long now1 = a, now2 = b, now = 0;
  vector<long long> f, s;
  bool can = true;
  for (long long i = ans; i > 0; --i) {
    if (max(now1, now2) < i) {
      can = false;
      break;
    }
    if (now1 > now2) {
      f.push_back(i);
      now1 -= i;
    } else {
      s.push_back(i);
      now2 -= i;
    }
    ++now;
  }
  cout << f.size() << '\n';
  for (int i = 0; i < f.size(); ++i) cout << f[i] << ' ';
  cout << '\n';
  cout << s.size() << '\n';
  for (int i = 0; i < s.size(); ++i) cout << s[i] << ' ';
}