#include <bits/stdc++.h>
using namespace std;
void debugs() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long multiply(long long x, long long res[], long long ressize) {
  long long carry = 0;
  for (long long i = 0; i < ressize; i++) {
    long long product = res[i] * x + carry;
    res[i] = product % 10;
    carry = product / 10;
  }
  while (carry) {
    res[ressize] = carry % 10;
    carry = carry / 10;
    ressize++;
  }
  return ressize;
}
void bigfactorial(long long n) {
  long long ressize = 1;
  long long res[10000];
  res[0] = 1;
  for (long long i = 2; i <= n; i++) {
    ressize = multiply(i, res, ressize);
  }
  for (long long i = ressize - 1; i >= 0; i--) {
    cout << res[i];
  }
}
bool substring(string s1, string s2) {
  int M = s1.length();
  int N = s2.length();
  for (int i = 0; i <= N - M; i++) {
    int j;
    for (j = 0; j < M; j++)
      if (s2[i + j] != s1[j]) break;
    if (j == M) return true;
    ;
  }
  return false;
  ;
}
long long n;
bool palindrome(string s) {
  string t;
  t = s;
  reverse(t.begin(), t.end());
  if (s == t) {
    return true;
  }
  return false;
}
bool issafe(vector<vector<long long>> board, long long row, long long col) {
  for (long long i = 0; i < col; i++) {
    if (board[row][i]) return false;
  }
  for (long long i = row, j = col; i >= 0 && j >= 0; i--, j--) {
    if (board[i][j] == 1) return false;
  }
  for (long long i = row, j = col; i < n && j < n; i++, j++) {
    if (board[i][j] == 1) return false;
  }
  return true;
}
void display(vector<vector<long long>> &board) {
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      cout << board[i][j] << " ";
    }
    cout << endl;
  }
}
bool solvenqueen(vector<vector<long long>> &board, long long col) {
  if (col >= n) {
    return true;
  }
  for (long long i = 0; i < n; i++) {
    if (issafe(board, i, col)) {
      board[i][col] = 1;
      if (solvenqueen(board, col + 1)) return true;
      board[i][col] = 0;
    }
  }
  return false;
}
int convertstring(string s) {
  stringstream geek(s);
  int x = 0;
  geek >> x;
  return x;
}
bool binary(long long k, long long a[]) {
  long long l = 1;
  long long r = 1e4;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (a[mid] == (k)) {
      return true;
    } else if (a[mid] > (k)) {
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  return false;
}
bool notprime(int n) {
  if (n == 2 || n == 3 || n == 5 || n == 7) {
    return false;
  }
  return true;
}
int bin(string n) {
  int num = convertstring(n);
  int dec_value = 0;
  int base = 1;
  int temp = num;
  while (temp) {
    int last_digit = temp % 10;
    temp = temp / 10;
    dec_value += last_digit * base;
    base = base * 2;
  }
  return dec_value;
}
bool sorted(int a[], int n) {
  for (int i = 1; i <= n - 1; i++) {
    if (a[i] > a[i + 1]) {
      return false;
    }
  }
  return true;
}
int main() {
  long long a, b;
  cin >> a >> b;
  int m = ((a + b) / 2) - min(a, b);
  int maxi = a + b - (((a + b) / 2) - min(a, b));
  if ((a + b) % 2 == 0) {
    cout << (maxi - m) / 2 + 1 << endl;
    for (int i = m; i <= maxi; i += 2) {
      cout << i << " ";
    }
    cout << endl;
  } else {
    cout << maxi - m + 1 << endl;
    for (int i = m; i <= maxi; i++) {
      cout << i << " ";
    }
    cout << endl;
  }
}
}

### Prompt

Please create a solution in cpp to 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;
void debugs() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long multiply(long long x, long long res[], long long ressize) {
  long long carry = 0;
  for (long long i = 0; i < ressize; i++) {
    long long product = res[i] * x + carry;
    res[i] = product % 10;
    carry = product / 10;
  }
  while (carry) {
    res[ressize] = carry % 10;
    carry = carry / 10;
    ressize++;
  }
  return ressize;
}
void bigfactorial(long long n) {
  long long ressize = 1;
  long long res[10000];
  res[0] = 1;
  for (long long i = 2; i <= n; i++) {
    ressize = multiply(i, res, ressize);
  }
  for (long long i = ressize - 1; i >= 0; i--) {
    cout << res[i];
  }
}
bool substring(string s1, string s2) {
  int M = s1.length();
  int N = s2.length();
  for (int i = 0; i <= N - M; i++) {
    int j;
    for (j = 0; j < M; j++)
      if (s2[i + j] != s1[j]) break;
    if (j == M) return true;
    ;
  }
  return false;
  ;
}
long long n;
bool palindrome(string s) {
  string t;
  t = s;
  reverse(t.begin(), t.end());
  if (s == t) {
    return true;
  }
  return false;
}
bool issafe(vector<vector<long long>> board, long long row, long long col) {
  for (long long i = 0; i < col; i++) {
    if (board[row][i]) return false;
  }
  for (long long i = row, j = col; i >= 0 && j >= 0; i--, j--) {
    if (board[i][j] == 1) return false;
  }
  for (long long i = row, j = col; i < n && j < n; i++, j++) {
    if (board[i][j] == 1) return false;
  }
  return true;
}
void display(vector<vector<long long>> &board) {
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      cout << board[i][j] << " ";
    }
    cout << endl;
  }
}
bool solvenqueen(vector<vector<long long>> &board, long long col) {
  if (col >= n) {
    return true;
  }
  for (long long i = 0; i < n; i++) {
    if (issafe(board, i, col)) {
      board[i][col] = 1;
      if (solvenqueen(board, col + 1)) return true;
      board[i][col] = 0;
    }
  }
  return false;
}
int convertstring(string s) {
  stringstream geek(s);
  int x = 0;
  geek >> x;
  return x;
}
bool binary(long long k, long long a[]) {
  long long l = 1;
  long long r = 1e4;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (a[mid] == (k)) {
      return true;
    } else if (a[mid] > (k)) {
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  return false;
}
bool notprime(int n) {
  if (n == 2 || n == 3 || n == 5 || n == 7) {
    return false;
  }
  return true;
}
int bin(string n) {
  int num = convertstring(n);
  int dec_value = 0;
  int base = 1;
  int temp = num;
  while (temp) {
    int last_digit = temp % 10;
    temp = temp / 10;
    dec_value += last_digit * base;
    base = base * 2;
  }
  return dec_value;
}
bool sorted(int a[], int n) {
  for (int i = 1; i <= n - 1; i++) {
    if (a[i] > a[i + 1]) {
      return false;
    }
  }
  return true;
}
int main() {
  long long a, b;
  cin >> a >> b;
  int m = ((a + b) / 2) - min(a, b);
  int maxi = a + b - (((a + b) / 2) - min(a, b));
  if ((a + b) % 2 == 0) {
    cout << (maxi - m) / 2 + 1 << endl;
    for (int i = m; i <= maxi; i += 2) {
      cout << i << " ";
    }
    cout << endl;
  } else {
    cout << maxi - m + 1 << endl;
    for (int i = m; i <= maxi; i++) {
      cout << i << " ";
    }
    cout << endl;
  }
}
}

```