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 JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;

public class ProblemD {
	static final long MOD = 1000000007;
	
	static class Bag implements Comparable<Bag> {
		int id;
		int coin;
		int direct;
		int children;
		Bag(int i, int c) {
			id = i;
			coin = c;
			direct = c;
			children = -1;
		}
		@Override
		public int compareTo(Bag arg0) {
			return coin - arg0.coin;
		}
		
		
		public String toString() {
			if (children == -1) {
				return direct + " 0";
			} else {
				return direct + " 1 " + children;
			}
		}
	}
	
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		
		String[] ns = in.readLine().split(" ");
		int n = Integer.valueOf(ns[0]);
		int s = Integer.valueOf(ns[1]);
		
		String[] ai = in.readLine().split(" ");
		Bag[] a = new Bag[n];
		long total = 0;
		for (int i = 0 ; i < n ; i++) {
			int c = Integer.valueOf(ai[i]);
			a[i] = new Bag(i+1, c);
			total += a[i].coin;
		}
		Arrays.sort(a);
		int left = (int)(s - a[n-1].coin);
		if (total < s || total - a[n-1].coin < 0 || left < 0) {
			out.println(-1);
			out.flush();
			return;
		}

		//
		int per = 50;
		long ptn = (1L<<per)-1;
		long[] bits = new long[per+1];
		for (int i = 0 ; i <= per ; i++) {
			bits[i] = (1L<<i)-1;
		}
		long[][] dp = new long[2][1500];
		int[] taken = new int[70001];
		Arrays.fill(taken, Integer.MAX_VALUE);
		dp[0][0] = 1;
		taken[0] = -1;
		for (int i = 0 ; i < n - 1 ; i++) {
			int fr = i % 2;
			int to = 1 - fr;
			int keta = a[i].coin / per;
			int mod = a[i].coin % per;
			int vmod = per - mod;
			for (int j = 1499 ; j >= 0 ; j--) {
				if (dp[fr][j] >= 1) {
					long amari = (dp[fr][j] & (bits[per] - bits[vmod])) >> vmod;
					long movei = (dp[fr][j] & bits[vmod]) << mod; 
					int tj = j + keta;
					if (tj <= 1498) {
						dp[to][tj] |= movei;
						dp[to][tj+1] |= amari;
					}
					dp[to][j] |= dp[fr][j];
				}
			}
			for (int j = 1499 ; j >= 0 ; j--) {
				long diff = dp[to][j] - dp[fr][j];
				while (diff >= 1) {
					long ndiff = diff & (diff - 1);
					long bit = diff - ndiff;
					int idx = j * 50 - 1;
					while (bit >= 1) {
						idx++;
						bit >>>= 1;
					}
					if (idx <= 70000) {
						if (taken[idx] > n) {
							taken[idx] = i;
						}
					}
					diff = ndiff;
				}
			}
			Arrays.fill(dp[fr], 0);
		}

		if (taken[left] > n) {
			out.println(-1);
			out.flush();
			return;
		}
		
		boolean[] include = new boolean[n];
		include[n-1] = true;
		while (left >= 1) {
			int usedIdx = taken[left];
			include[usedIdx] = true;
			left -= a[usedIdx].coin;
		}
		solve(a, include);
		
		Arrays.sort(a, new Comparator<Bag>(){
			@Override
			public int compare(Bag arg0, Bag arg1) {
				return arg0.id - arg1.id;
			}
		});
		for (int i = 0 ; i < n ; i++) {
			out.println(a[i].toString());
		}
		out.flush();
	}
	
	
	public static void solve(Bag[] bag, boolean[] include) {
		int n = include.length;
		int parent = n-1;
		for (int i = n - 1 ; i >= 0 ; i--) {
			if (include[i]) {
			} else {
				bag[parent].children = bag[i].id;
				bag[parent].direct = (bag[parent].coin - bag[i].coin);
				parent = i;
			}
		}
	}
	
	public static void debug(Object... o) {
		System.err.println(Arrays.deepToString(o));
	}
	
}