#include <bits/stdc++.h>
using namespace std;
bool b[4][4][201][201];
unsigned char o[4][4][201][201][10];
unsigned char ans[201][201][2];
inline unsigned char smr(unsigned char a, unsigned char b) {
  return a < b ? a : b;
}
void push(unsigned char i, unsigned char j, unsigned char k, unsigned char l,
          unsigned char ik, unsigned char il, unsigned char ii,
          unsigned char ij) {
  if (k > 200 || l > 200 || i > 3 || j > 3) return;
  if (b[i][j][k][l]) return;
  b[i][j][k][l] = 1;
  if (i != 0 || j != 0) {
    for (int m = 0; m < i + j - 1; ++m) {
      o[i][j][k][l][m << 1] = o[ii][ij][ik][il][m << 1];
      o[i][j][k][l][m << 1 | 1] = o[ii][ij][ik][il][m << 1 | 1];
    }
    o[i][j][k][l][i + j - 1 << 1] = k - ik;
    o[i][j][k][l][i + j - 1 << 1 | 1] = l - il;
  }
  if (i == 3 || j == 3) {
    if (ans[k][l][0] - ans[k][l][1] < i - j) {
      ans[k][l][0] = i;
      ans[k][l][1] = j;
    }
    return;
  }
  if (i == 2 && j == 2) {
    for (int m = 0; m < 14; ++m) {
      push(i, j + 1, k + m, l + 15, k, l, i, j);
      push(i + 1, j, k + 15, l + m, k, l, i, j);
    }
    unsigned char lim = 200 - smr(k, l) + 2;
    for (int m = 16; m < lim; ++m) {
      push(i, j + 1, k + m - 2, l + m, k, l, i, j);
      push(i + 1, j, k + m, l + m - 2, k, l, i, j);
    }
    return;
  }
  for (int m = 0; m < 24; ++m) {
    push(i, j + 1, k + m, l + 25, k, l, i, j);
    push(i + 1, j, k + 25, l + m, k, l, i, j);
  }
  unsigned char lim = 200 - smr(k, l) + 2;
  for (int m = 26; m < lim; ++m) {
    push(i, j + 1, k + m - 2, l + m, k, l, i, j);
    push(i + 1, j, k + m, l + m - 2, k, l, i, j);
  }
  return;
}
int main() {
  for (int i = 0; i < 201; ++i)
    for (int j = 0; j < 201; ++j) ans[i][j][1] = 4;
  push(0, 0, 0, 0, 0, 0, 0, 0);
  int m, a, b;
  cin >> m;
  for (int i = 0; i < m; ++i) {
    cin >> a >> b;
    if (ans[a][b][1] > 3) {
      cout << "Impossible\n";
      continue;
    }
    printf("%d:%d\n", ans[a][b][0], ans[a][b][1]);
    for (int j = 0; j < ans[a][b][0] + ans[a][b][1]; ++j) {
      printf("%d:%d ", o[ans[a][b][0]][ans[a][b][1]][a][b][j << 1],
             o[ans[a][b][0]][ans[a][b][1]][a][b][j << 1 | 1]);
    }
    cout << endl;
  }
}
