Problem: Polycarp plays a computer game. In this game, the players summon armies of magical minions, which then fight each other.

Polycarp can summon n different minions. The initial power level of the i-th minion is a_i, and when it is summoned, all previously summoned minions' power levels are increased by b_i. The minions can be summoned in any order.

Unfortunately, Polycarp cannot have more than k minions under his control. To get rid of unwanted minions after summoning them, he may destroy them. Each minion can be summoned (and destroyed) only once.

Polycarp's goal is to summon the strongest possible army. Formally, he wants to maximize the sum of power levels of all minions under his control (those which are summoned and not destroyed).

Help Polycarp to make up a plan of actions to summon the strongest possible army!

Input

The first line contains one integer T (1 ≤ T ≤ 75) — the number of test cases.

Each test case begins with a line containing two integers n and k (1 ≤ k ≤ n ≤ 75) — the number of minions availible for summoning, and the maximum number of minions that can be controlled by Polycarp, respectively.

Then n lines follow, the i-th line contains 2 integers a_i and b_i (1 ≤ a_i ≤ 10^5, 0 ≤ b_i ≤ 10^5) — the parameters of the i-th minion.

Output

For each test case print the optimal sequence of actions as follows:

Firstly, print m — the number of actions which Polycarp has to perform (0 ≤ m ≤ 2n). Then print m integers o_1, o_2, ..., o_m, where o_i denotes the i-th action as follows: if the i-th action is to summon the minion x, then o_i = x, and if the i-th action is to destroy the minion x, then o_i = -x. Each minion can be summoned at most once and cannot be destroyed before being summoned (and, obviously, cannot be destroyed more than once). The number of minions in Polycarp's army should be not greater than k after every action.

If there are multiple optimal sequences, print any of them.

Example

Input


3
5 2
5 3
7 0
5 0
4 0
10 0
2 1
10 100
50 10
5 5
1 5
2 4
3 3
4 2
5 1


Output


4
2 1 -1 5
1
2
5
5 4 3 2 1

Note

Consider the example test.

In the first test case, Polycarp can summon the minion 2 with power level 7, then summon the minion 1, which will increase the power level of the previous minion by 3, then destroy the minion 1, and finally, summon the minion 5. After this, Polycarp will have two minions with power levels of 10.

In the second test case, Polycarp can control only one minion, so he should choose the strongest of them and summon it.

In the third test case, Polycarp is able to summon and control all five minions.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
public class Sol{
	static class specInt {
		int restore[];
		int val;
		public specInt(int val) {
			this.val = val;
			restore = new int[n+1];
		}
	}
	public static int mxN = 76;
	public static specInt dp[][] = new specInt[mxN][mxN];
	public static int arr[][];
	public static int n, k;
	public static int restore[];
	public static void main(String[] args) throws IOException{
		FastIO sc = new FastIO(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int t = sc.nextInt();
		while(t-->0) {
			n = sc.nextInt();
			k = sc.nextInt();
			arr = new int[n+1][3];
			restore = new int[n+1];
			for(int i=0; i<mxN; ++i) {
				for(int j=0; j<mxN; ++j) {
					dp[i][j] = new specInt(Integer.MIN_VALUE);
				}
			}
			for(int i=1; i<=n; ++i) {
				arr[i][0] = sc.nextInt();
				arr[i][1] = sc.nextInt();
				arr[i][2] = i;
			}
			ColumnSort(arr, 1);
			dp[0][0].val = 0;
			for(int i=1; i<=n; ++i) {
				for(int j=0; j<=k; ++j) {
					//if(dp[i-1][j].val!=Integer.MIN_VALUE) {
						if(arr[i][1]*(k-1)+dp[i-1][j].val>dp[i][j].val) {
							dp[i][j].val = arr[i][1]*(k-1)+dp[i-1][j].val;
							for(int b=1; b<=n; ++b) {
								dp[i][j].restore[b] = dp[i-1][j].restore[b];
							}
							dp[i][j].restore[i] = 0;
						}
						if(j<k&&arr[i][0] + arr[i][1]*j+dp[i-1][j].val>dp[i][j+1].val) {
							dp[i][j+1].val = arr[i][0] + arr[i][1]*j+dp[i-1][j].val;
							for(int b=1; b<=n; ++b) {
								dp[i][j+1].restore[b] = dp[i-1][j].restore[b];
							}
							dp[i][j+1].restore[i] = 1;
						}
					//}
				}
			}
			int idx = 0;
			int num = 0;
			for(int i=1; i<=n; ++i) {
				if(dp[n][k].restore[i]==1) num++;
				else num+=2;
			}
			out.println(num);
			for(int i=1; i<=n; ++i) {
				if(idx<k-1&&dp[n][k].restore[i]==1) {
					out.print(arr[i][2] + " ");
					idx++;
				}
			}
			for(int i=1; i<=n; ++i) {
				if(dp[n][k].restore[i]==0) {
					out.print(arr[i][2] + " " + (-arr[i][2]) + " ");
				}
			}
			for(int i=n; i>=0; --i) {
				if(dp[n][k].restore[i]==1) {
					out.println(arr[i][2]);
					break;
				}
			}
			out.println();
		}

		out.close();
	}
    public static void ColumnSort(int arr[][], int col) { 
        Arrays.sort(arr, new Comparator<int[]>() { 
            @Override 
          public int compare(int[] entry1,  
                             int[] entry2) { 
            	Integer a = entry1[col];
            	Integer b = entry2[col];
            	return a.compareTo(b);
          } 
        }); 
    }
	static class FastIO {
		 
		// Is your Fast I/O being bad?
 
		InputStream dis;
		byte[] buffer = new byte[1 << 17];
		int pointer = 0;
 
		public FastIO(String fileName) throws IOException {
			dis = new FileInputStream(fileName);
		}
 
		public FastIO(InputStream is) throws IOException {
			dis = is;
		}
 
		int nextInt() throws IOException {
			int ret = 0;
 
			byte b;
			do {
				b = nextByte();
			} while (b <= ' ');
			boolean negative = false;
			if (b == '-') {
				negative = true;
				b = nextByte();
			}
			while (b >= '0' && b <= '9') {
				ret = 10 * ret + b - '0';
				b = nextByte();
			}
 
			return (negative) ? -ret : ret;
		}
 
		long nextLong() throws IOException {
			long ret = 0;
 
			byte b;
			do {
				b = nextByte();
			} while (b <= ' ');
			boolean negative = false;
			if (b == '-') {
				negative = true;
				b = nextByte();
			}
			while (b >= '0' && b <= '9') {
				ret = 10 * ret + b - '0';
				b = nextByte();
			}
 
			return (negative) ? -ret : ret;
		}
 
		byte nextByte() throws IOException {
			if (pointer == buffer.length) {
				dis.read(buffer, 0, buffer.length);
				pointer = 0;
			}
			return buffer[pointer++];
		}
 
		String next() throws IOException {
			StringBuffer ret = new StringBuffer();
 
			byte b;
			do {
				b = nextByte();
			} while (b <= ' ');
			while (b > ' ') {
				ret.appendCodePoint(b);
				b = nextByte();
			}
 
			return ret.toString();
		}
 
	}
}