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>
struct bag {
  bag() : size(), index(), head(0) {}
  bag(unsigned int _size, unsigned int _index)
      : size(_size), index(_index), head(0) {}
  friend bool operator<(bag const &lhs, bag const &rhs) {
    if (lhs.size != rhs.size) return lhs.size < rhs.size;
    return lhs.index < rhs.index;
  }
  unsigned int size;
  unsigned int index;
  bool head;
  unsigned int next;
};
unsigned int N = 0, S = 0;
unsigned int a[70042];
unsigned int next[70042];
bag as[70042];
unsigned int ui[70042];
unsigned int us = 0;
bool get(unsigned int const *A, unsigned int s) {
  unsigned int i = s / 32;
  unsigned int m = 1u << (s % 32);
  return A[i] & m;
}
int main() {
  scanf("%u%u", &N, &S);
  for (unsigned int n = 1; n <= N; ++n) {
    scanf("%u", &a[n]);
    as[n].size = a[n];
    as[n].index = n;
  }
  std::sort(as + 1, as + N + 1);
  if (as[N].size <= S) {
    unsigned int target = S - as[N].size;
    unsigned int to = target / 32;
    unsigned int A[2200] = {1};
    unsigned int B[2200] = {1};
    unsigned int first[70042] = {};
    for (unsigned int n = 1; n < N; ++n) {
      unsigned int s = as[n].size, so = s / 32, si = s % 32;
      if (si)
        for (unsigned int i = 0, c = 0; i + so <= to; ++i) {
          B[i + so] |= c | (A[i] << si);
          c = A[i] >> (32 - si);
        }
      else
        for (unsigned int i = 0; i + so <= to; ++i) B[i + so] |= A[i];
      for (unsigned int i = 0; i <= to; ++i) {
        unsigned int f = B[i] & ~A[i];
        if (f)
          for (unsigned int o = 0; o < 32; ++o)
            if (f & (1 << o)) first[i * 32 + o] = n;
        A[i] = B[i];
      }
    }
    if (target == 0 || first[target] != 0) {
      ui[us++] = N;
      unsigned int s = target;
      while (s) {
        unsigned int n = first[s];
        assert(n != 0);
        ui[us++] = n;
        s -= as[n].size;
      }
      for (unsigned int i = 0; i < us; ++i) as[ui[i]].head = 1;
      for (unsigned int k = N, prev = as[N].index; k; --k) {
        unsigned int i = as[k].index;
        next[i] = i;
        if (!as[k].head) {
          next[prev] = i;
          prev = i;
        }
      }
      for (unsigned int i = 1; i <= N; ++i) {
        unsigned int n = next[i];
        if (n == i)
          printf("%u 0\n", a[i]);
        else
          printf("%u 1 %u\n", a[i] - a[n], n);
      }
    } else
      printf("-1\n");
  } else
    printf("-1\n");
}