Problem: When you were a child you must have been told a puzzle of bags and coins. Anyway, here's one of its versions: 

A horse has three bags. The first bag has one coin, the second bag has one coin and the third bag has three coins. In total, the horse has three coins in the bags. How is that possible?

The answer is quite simple. The third bag contains a coin and two other bags. 

This problem is a generalization of the childhood puzzle. You have n bags. You know that the first bag contains a1 coins, the second bag contains a2 coins, ..., the n-th bag contains an coins. In total, there are s coins. Find the way to arrange the bags and coins so that they match the described scenario or else state that it is impossible to do.

Input

The first line contains two integers n and s (1 ≤ n, s ≤ 70000) — the number of bags and the total number of coins. The next line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 70000), where ai shows the number of coins in the i-th bag.

Output

If the answer doesn't exist, print -1. 

Otherwise, print n lines, on the i-th line print the contents of the i-th bag. The first number in the line, ci (0 ≤ ci ≤ ai), must represent the number of coins lying directly in the i-th bag (the coins in the bags that are in the i-th bag are not taken into consideration). The second number in the line, ki (0 ≤ ki < n) must represent the number of bags that lie directly in the i-th bag (the bags that are inside the bags lying in the i-th bag are not taken into consideration). Next, the line must contain ki integers — the numbers of the bags that are lying directly in the i-th bag.

The total number of coins in the solution must equal s. If we count the total number of coins the i-th bag in the solution has, we should get ai. 

No bag can directly lie in more than one bag. The bags can be nested in more than one level (see the second test case). If there are multiple correct answers, you can print any of them.

Examples

Input

3 3
1 3 1


Output

1 0
1 2 3 1
1 0


Input

3 3
1 3 1


Output

1 0
2 1 3
0 1 1


Input

1 2
1


Output

-1


Input

8 10
2 7 3 4 1 3 1 2


Output

2 0
1 2 1 4
0 2 7 8
0 2 5 6
1 0
3 0
1 0
2 0

Note

The pictures below show two possible ways to solve one test case from the statement. The left picture corresponds to the first test case, the right picture corresponds to the second one.

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int nCoins, nBags;
typedef struct bag {
  int id;
  int cs;

 public:
  bag(int ii, int cc) : id(ii), cs(cc) {}
  bool operator<(const bag& b) const { return cs > b.cs; }
} bag;
vector<bag> bags;
int bagcs[70004];
const int BITS_N = 2200;
struct bits {
  unsigned int xs[BITS_N];
  bits() { fill(xs, xs + BITS_N, 0); }
  bits(const bits& o) { copy(o.xs, o.xs + BITS_N, xs); }
  void operator=(const bits& o) { copy(o.xs, o.xs + BITS_N, xs); }
  void operator<<=(int d) {
    int bd = d / 32, sd = d % 32;
    for (int i = BITS_N - 1 - bd; i >= 0; i--) {
      xs[i + bd] = xs[i] << sd | ((i && sd) ? (xs[i - 1] >> (32 - sd)) : 0);
    }
  }
  void operator|=(const bits& o) {
    for (int i = 0; i < BITS_N; i++) xs[i] |= o.xs[i];
  }
  void operator&=(const bits& o) {
    for (int i = 0; i < BITS_N; i++) xs[i] &= o.xs[i];
  }
  void setAndNot(const bits& o) {
    for (int i = 0; i < BITS_N; i++) xs[i] &= ~o.xs[i];
  }
  void invert() {
    for (int i = 0; i < BITS_N; i++) xs[i] = ~xs[i];
  }
  void getOnes(vector<int>& out) {
    out.clear();
    for (int i = 0; i < BITS_N; i++) {
      unsigned int x = xs[i];
      while (x) {
        int c = __builtin_ctz(x);
        out.push_back(i * 32 + c);
        x &= ~(1u << c);
      }
    }
  }
  void set(int ix) {
    int bix = ix / 32, six = ix % 32;
    xs[bix] |= (1u << six);
  }
};
void readInput() {
  scanf("%d%d", &nBags, &nCoins);
  for (int i = 1; i <= nBags; i++) {
    int x;
    scanf("%d", &x);
    bagcs[i] = x;
    bags.push_back(bag(i, x));
  }
}
vector<int> v;
void outputAnswer() {
  sort(bags.begin(), bags.end());
  int rcs = nCoins - bags[0].cs;
  ((void)0);
  if (rcs < 0) {
    printf("-1\n");
    return;
  }
  bits dp, dp2;
  dp.set(0);
  int dpp[70700];
  memset(dpp, 0, sizeof(dpp));
  dpp[0] = -1;
  bool done = false;
  for (int i = 1; i < bags.size() && !done; i++) {
    const bag& b = bags[i];
    dp2 = dp;
    dp2 <<= b.cs;
    dp2.setAndNot(dp);
    dp |= dp2;
    dp2.getOnes(v);
    for (int j = 0; j < v.size(); j++) {
      dpp[v[j]] = bags[i].id;
      if (v[j] == rcs) {
        done = true;
        break;
      }
    }
  }
  if (dpp[rcs] != 0) {
    bool solo[70004];
    int contains[70004];
    for (int j = 1; j <= nBags; j++) {
      solo[j] = false;
    }
    int s = rcs;
    while (s > 0) {
      solo[dpp[s]] = true;
      s -= bagcs[dpp[s]];
    }
    int bigid = bags[0].id;
    int stackid = bigid;
    for (int j = 1; j < bags.size(); j++) {
      if (!solo[bags[j].id]) {
        contains[stackid] = bags[j].id;
        stackid = bags[j].id;
      }
    }
    for (int j = 1; j < nBags + 1; j++) {
      if (!solo[j] && j != stackid) {
        int inside = contains[j];
        printf("%d 1 %d\n", bagcs[j] - bagcs[inside], inside);
      } else {
        printf("%d 0\n", bagcs[j]);
      }
    }
    return;
  }
  printf("-1\n");
  return;
}
int main() {
  readInput();
  outputAnswer();
}