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;
const double pi = acos(-1.0);
const int intmax = 0x3f3f3f3f;
const long long lldmax = 0x3f3f3f3f3f3f3f3fll;
double eps = 1e-6;
template <class T>
inline void checkmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void checkmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline T lowbit(T n) {
  return (n ^ (n - 1)) & n;
}
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
template <class T>
inline T checkmod(T n, T m) {
  return (n % m + m) % m;
}
inline int rand(int a, int b) {
  if (a >= b) return a;
  return rand() % (b - a) + a;
}
template <class T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
template <class T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
inline T euclid(T a, T b, T &x, T &y) {
  if (a < 0) {
    T d = euclid(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = euclid(a, -b, x, y);
    y = -y;
    return d;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = euclid(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
template <class T>
inline vector<pair<T, int> > factorize(T n) {
  vector<pair<T, int> > R;
  for (T i = 2; n > 1;) {
    if (n % i == 0) {
      int C = 0;
      for (; n % i == 0; C++, n /= i)
        ;
      R.push_back(make_pair(i, C));
    }
    i++;
    if (i > n / i) i = n;
  }
  if (n > 1) R.push_back(make_pair(n, 1));
  return R;
}
template <class T>
inline bool isPrimeNumber(T n) {
  if (n <= 1) return false;
  for (T i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
template <class T>
inline T eularFunction(T n) {
  vector<pair<T, int> > R = factorize(n);
  T r = n;
  for (int i = 0; i < R.size(); i++) r = r / R[i].first * (R[i].first - 1);
  return r;
}
template <class T>
inline int dblcmp(T a, const T b) {
  a -= b;
  return a > eps ? 1 : (a < -eps ? -1 : 0);
}
template <class T>
inline int sgn(T a) {
  return a > eps ? 1 : (a < -eps ? -1 : 0);
}
const int l = 32;
const int N = 70010 + l;
const int M = N / l;
unsigned int dp[2][M] = {0};
int fb[N];
unsigned int *cur, *nxt;
int n, s;
int in[N];
struct NODE {
  int a, id;
  bool operator<(const NODE &B) const {
    if (a != B.a)
      return a < B.a;
    else
      return id < B.id;
  }
} a[N];
bool test() { return fb[s] != -1; }
bool gao(int v, int id) {
  int s = v / l, r = v % l;
  unsigned int ta, tb;
  for (int i = 0; i < M; ++i) {
    ta = cur[i] << r;
    tb = cur[i] >> (l - r);
    if (r == 0) tb = 0;
    if (i + s < M)
      nxt[i + s] |= ta;
    else
      break;
    if (i + s + 1 < M) {
      nxt[i + s + 1] |= tb;
    }
  }
  for (int i = 0; i < M; ++i) {
    if (nxt[i] == cur[i]) continue;
    ta = nxt[i] ^ cur[i];
    for (int j = 0; j < l && ta; ++j, ta >>= 1) {
      if (ta & 1) {
        fb[i * l + j] = id;
      }
    }
  }
  return test();
}
bool mark[N] = {0};
int pre[N] = {0};
int main() {
  memset(fb, 0xff, sizeof(fb));
  scanf("%d%d", &n, &s);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].a);
    in[i + 1] = a[i].a;
    a[i].id = i + 1;
  }
  sort(a, a + n);
  cur = dp[0], nxt = dp[1];
  cur[0] = 1;
  nxt[0] = 1;
  fb[0] = 0;
  s -= a[n - 1].a;
  if (s > 0) {
    for (int i = n - 2; i >= 0; --i) {
      if (gao(a[i].a, a[i].id)) break;
      swap(cur, nxt);
      for (int j = 0; j < M; ++j) nxt[j] = cur[j];
    }
  }
  if (s < 0 || !test()) {
    puts("-1");
  } else {
    memset(mark, 0, sizeof(mark));
    mark[a[n - 1].id] = true;
    int t, ttt = 0;
    for (int i = s; i != 0; i -= in[t]) {
      t = fb[i];
      if (fb[i] == -1) pre[-100000] = 1;
      if (mark[t] == true)
        cout << i << ' ' << in[fb[i]] << ' ' << fb[i] << endl;
      mark[t] = true;
      ttt += in[t];
    }
    for (int i = n - 1; i >= 0; --i) {
      if (mark[a[i].id] == false) {
        pre[a[i + 1].id] = a[i].id;
      }
    }
    for (int i = 1; i <= n; ++i) {
      if (pre[i] == 0) {
        printf("%d %d\n", in[i], 0);
      } else {
        printf("%d 1 %d\n", in[i] - in[pre[i]], pre[i]);
      }
    }
  }
  return 0;
}