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.util.*;

public class Main {
    
    static class Bag implements Comparable<Bag> {
        public int index;
        public int value;
        public Bag(int index, int value) {
            this.index = index;
            this.value = value;
        }
        
        @Override
        public int compareTo(Bag o) {
            return o.value - value;
        }
        
        public String toString() {
            return index + " " + value;
        }
    }
    
    private static final long MOD = 1000000007;
    
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int s = scan.nextInt();
        
        Bag[] original = new Bag[n];
        Bag[] sorted = new Bag[n];
        int maxValue = 0;
        for (int i = 0; i < n; i++) {
            original[i] = sorted[i] = new Bag(i, scan.nextInt());
            maxValue = Math.max(maxValue, original[i].value);
        }
        scan.close();
        
        Arrays.sort(sorted);
        
        s -= sorted[0].value;
        if (s < 0) {
            System.out.println(-1);
            return;
        }
        
        HashMap<Integer, ArrayList<Bag>> map = new HashMap<Integer, ArrayList<Bag>>();
        for (int i = 1; i <= maxValue; i++) {
            map.put(i, new ArrayList<Bag>());
        }
        for (int i = 1; i < n; i++) {
            map.get(sorted[i].value).add(sorted[i]);
        }
        
        HashSet<Integer> current = new HashSet<Integer>();
        HashSet<Integer> next = new HashSet<Integer>();
        current.add(0);
        int[] prev = new int[s + 1];
        Arrays.fill(prev, -1);
        prev[0] = sorted[0].index;
        for (int i = 1; i <= maxValue; i++) {
            ArrayList<Bag> bagList = map.get(i);
            if (bagList.isEmpty()) {
                continue;
            }
            for (int val : current) {
                next.add(val);
                for (int j = 0, sum = val + i; j < bagList.size() && sum <= s; j++, sum += i) {
                    if (prev[sum] == -1) {
                        prev[sum] = bagList.get(j).index;
                        next.add(sum);
                    } else {
                        break;
                    }
                }
            }
            if (next.contains(s)) {
                break;
            }
            HashSet<Integer> temp = current;
            current = next;
            next = temp;
            next.clear();
        }
        
        if (prev[s] == -1) {
            System.out.println(-1);
            return;
        }
        
        HashSet<Integer> root = new HashSet<Integer>();
        int search = s;
        while (search > 0) {
            if (root.contains(prev[search])) {
                throw new Error();
            }
            root.add(prev[search]);
            search -= original[prev[search]].value;
        }
        if (root.contains(prev[0])) {
            throw new Error();
        }
        root.add(prev[0]);
        
        int[] contain = new int[n];
        int last = -1;
        for (int i = n - 1; i > 0; i--) {
            int index = sorted[i].index;
            if (root.contains(index)) {
                contain[index] = -1;
            } else {
                contain[index] = last;
                last = index;
            }
        }
        contain[sorted[0].index] = last;
        
        for (int i = 0; i < n; i++) {
            if (contain[i] == -1) {
                System.out.println(String.format("%d 0", original[i].value));
            } else {
                System.out.println(String.format("%d 1 %d", original[i].value - original[contain[i]].value, contain[i] + 1));
            }
        }
    }
    
    private static void print(int... arr) {
        System.out.print(arr[0]);
        for (int i = 1; i < arr.length; i++) {
            System.out.print(" ");
            System.out.print(arr[i]);
        }
        System.out.println();
    }
    
    private static void print(long... arr) {
        System.out.print(arr[0]);
        for (int i = 1; i < arr.length; i++) {
            System.out.print(" ");
            System.out.print(arr[i]);
        }
        System.out.println();
    }
    
    private static <T> void print(T... arr) {
        System.out.print(arr[0]);
        for (int i = 1; i < arr.length; i++) {
            System.out.print(" ");
            System.out.print(arr[i]);
        }
        System.out.println();
    }
    
    private static void read(Scanner scan, int[]... arrs) {
        int len = arrs[0].length;
        for (int i = 0; i < len; i++) {
            for (int[] arr : arrs) {
                arr[i] = scan.nextInt();
            }
        }
    }
    
    private static void read(Scanner scan, long[]... arrs) {
        int len = arrs[0].length;
        for (int i = 0; i < len; i++) {
            for (long[] arr : arrs) {
                arr[i] = scan.nextLong();
            }
        }
    }
    
    private static void decreaseByOne(int[]... arrs) {
        for (int[] arr : arrs) {
            for (int i = 0; i < arr.length; i++) {
                arr[i] --;
            }
        }
    }
}