#include <bits/stdc++.h>
using namespace std;
long long int inf = 1e18;
long long int mod = 1e9 + 7;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
long long int power(long long int x, long long int y, long long int p) {
  if (x == 0) return 0;
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int pwr(long long int x, long long int y) {
  if (x == 0) return 0;
  long long int res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
long long int ncr(long long int n, long long int r) {
  if (r > n) {
    return 0;
  }
  if (r > n - r) {
    r = n - r;
  }
  long long int ans = 1;
  for (long long int i = 1; i <= r; i++) {
    ans *= (n - i + 1);
    ans %= mod;
    ans *= modInverse(i, mod);
    ans %= mod;
  }
  return ans;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int TESTS, i, j, k, flag, t1, t2, t3, t4, t5, t6, t7, t8, t9;
  cin >> TESTS;
  while (TESTS--) {
    long long int a, b;
    cin >> a >> b;
    t1 = min(a, b);
    long long int left = (a + b) - (2 * t1);
    set<long long int> out;
    t2 = left / 2;
    out.insert(t2);
    out.insert(a + b - t2);
    for (i = 1; i <= t1; i++) {
      t2 += 2;
      out.insert(t2);
      out.insert(a + b - t2);
    }
    cout << out.size() << "\n";
    for (auto c : out) cout << c << " ";
    cout << "\n";
  }
}

### Prompt

Create a solution in CPP for the following problem:

Alice and Borys are playing tennis.

A tennis match consists of games. In each game, one of the players is serving and the other one is receiving.

Players serve in turns: after a game where Alice is serving follows a game where Borys is serving, and vice versa.

Each game ends with a victory of one of the players. If a game is won by the serving player, it's said that this player holds serve. If a game is won by the receiving player, it's said that this player breaks serve.

It is known that Alice won a games and Borys won b games during the match. It is unknown who served first and who won which games.

Find all values of k such that exactly k breaks could happen during the match between Alice and Borys in total.

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 10^3). Description of the test cases follows.

Each of the next t lines describes one test case and contains two integers a and b (0 ≤ a, b ≤ 10^5; a + b > 0) — the number of games won by Alice and Borys, respectively.

It is guaranteed that the sum of a + b over all test cases does not exceed 2 ⋅ 10^5.

Output

For each test case print two lines.

In the first line, print a single integer m (1 ≤ m ≤ a + b + 1) — the number of values of k such that exactly k breaks could happen during the match.

In the second line, print m distinct integers k_1, k_2, …, k_m (0 ≤ k_1 < k_2 < … < k_m ≤ a + b) — the sought values of k in increasing order.

Example

Input


3
2 1
1 1
0 5


Output


4
0 1 2 3
2
0 2
2
2 3

Note

In the first test case, any number of breaks between 0 and 3 could happen during the match: 

  * Alice holds serve, Borys holds serve, Alice holds serve: 0 breaks; 
  * Borys holds serve, Alice holds serve, Alice breaks serve: 1 break; 
  * Borys breaks serve, Alice breaks serve, Alice holds serve: 2 breaks; 
  * Alice breaks serve, Borys breaks serve, Alice breaks serve: 3 breaks. 



In the second test case, the players could either both hold serves (0 breaks) or both break serves (2 breaks).

In the third test case, either 2 or 3 breaks could happen: 

  * Borys holds serve, Borys breaks serve, Borys holds serve, Borys breaks serve, Borys holds serve: 2 breaks; 
  * Borys breaks serve, Borys holds serve, Borys breaks serve, Borys holds serve, Borys breaks serve: 3 breaks. 

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long int inf = 1e18;
long long int mod = 1e9 + 7;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
long long int power(long long int x, long long int y, long long int p) {
  if (x == 0) return 0;
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int pwr(long long int x, long long int y) {
  if (x == 0) return 0;
  long long int res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
long long int ncr(long long int n, long long int r) {
  if (r > n) {
    return 0;
  }
  if (r > n - r) {
    r = n - r;
  }
  long long int ans = 1;
  for (long long int i = 1; i <= r; i++) {
    ans *= (n - i + 1);
    ans %= mod;
    ans *= modInverse(i, mod);
    ans %= mod;
  }
  return ans;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int TESTS, i, j, k, flag, t1, t2, t3, t4, t5, t6, t7, t8, t9;
  cin >> TESTS;
  while (TESTS--) {
    long long int a, b;
    cin >> a >> b;
    t1 = min(a, b);
    long long int left = (a + b) - (2 * t1);
    set<long long int> out;
    t2 = left / 2;
    out.insert(t2);
    out.insert(a + b - t2);
    for (i = 1; i <= t1; i++) {
      t2 += 2;
      out.insert(t2);
      out.insert(a + b - t2);
    }
    cout << out.size() << "\n";
    for (auto c : out) cout << c << " ";
    cout << "\n";
  }
}

```