Polycarp is playing a game called "Running Over The Bridges". In this game he has to run over n bridges from the left to the right. Bridges are arranged one after the other, so the i-th bridge begins where the (i - 1)-th bridge ends.

You have the following data about bridges: li and ti — the length of the i-th bridge and the maximum allowed time which Polycarp can spend running over the i-th bridge. Thus, if Polycarp is in the beginning of the bridge i at the time T then he has to leave it at the time T + ti or earlier. It is allowed to reach the right end of a bridge exactly at the time T + ti.

Polycarp can run from the left side to the right one with speed 0.5, so he will run over a bridge with length s in time 2·s. Besides, he has several magical drinks. If he uses one drink, his speed increases twice (i.e. to value 1) for r seconds. All magical drinks are identical. Please note that Polycarp can use a drink only at integer moments of time, and he drinks it instantly and completely. Additionally, if Polycarp uses a drink at the moment T he can use the next drink not earlier than at the moment T + r.

What is the minimal number of drinks Polycarp has to use to run over all n bridges? If this number is not greater than 105, then you have to find out the moments of time when Polycarp has to use each magical drink.

Input

The first line contains two integers n and r (1 ≤ n ≤ 2·105, 1 ≤ r ≤ 1012) — the number of bridges and the duration of the effect of a magical drink.

The second line contains a sequence of integers l1, l2, ..., ln (1 ≤ li ≤ 5·106), where li is equal to the length of the i-th bridge.

The third line contains a sequence of integers t1, t2, ..., tn (1 ≤ ti ≤ 107), where ti is equal to the maximum allowed time which Polycarp can spend running over the i-th bridge.

Output

The first line of the output should contain k — the minimal number of drinks which Polycarp has to use, or -1 if there is no solution.

If the solution exists and the value of k is not greater than 105 then output k integers on the next line — moments of time from beginning of the game when Polycarp has to use drinks. Print the moments of time in chronological order. If there are several solutions, you can output any of them.

Examples

Input

1 3
7
10


Output

2
0 3


Input

3 3
3 3 3
3 3 2


Output

-1


Input

3 100000
5 5 5
5 7 8


Output

1
0 


Input

4 1000
1 2 3 4
10 9 10 9


Output

0

Note

In the first case, there is only one bridge and it is clear that Polycarp cannot run over it without magical drinks. So, if he will use one magical drink on start (moment of time 0), and the second one — three seconds later (moment of time 3), he will be able to reach the end of the bridge in time. Please note, in this case there are several possible answers to the problem. For example, Polycarp can use the first drink at the moment of time 4 and the second one — at the moment of time 7.

In the second case, Polycarp cannot run over all bridges even if he will use magical drinks. So, answer in this case is -1.

In the fourth case, Polycarp can run over all bridges without magical drinks. 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
/*
100 62
2 22 138 118 45 57 123 83 30 19 75 88 17 0 37 43 32 72 3 14 4 7 3 6 133 74 27 113 18 0 90 19 39 161 30 81 3 18 32 33 84 112 14 43 61 39 0 96 44 0 61 17 29 51 71 173 165 109 20 30 2 26 152 24 9 19 117 23 22 24 140 52 49 103 71 108 8 22 1 63 59 118 39 78 56 27 6 8 19 57 97 9 107 11 7 53 26 97 84 43 
76 56 154 124 56 129 138 178 36 48 80 127 107 35 112 52 34 130 74 85 130 135 130 54 137 142 34 180 184 3 107 24 124 165 73 129 13 138 127 52 125 123 72 116 178 158 1 112 60 5 64 147 31 62 97 179 185 190 143 150 52 57 153 132 33 195 196 118 26 47 157 155 58 131 163 178 173 78 9 113 82 173 124 114 137 60 57 26 35 145 111 11 111 43 10 131 109 117 140 151 

57
80 142 216 278 362 484 546 754 826 966 1106 1172 1340 1402 1464 1574 1770 1866 1994 2056 2118 2278 2426 2582 2644 3006 3068 3136 3228 3312 3414 3476 3538 3640 3702 3764 4082 4144 4206 4460 4530 4626 4688 4828 4946 5272 5448 5640 5702 5836 6040 6130 6192 6262 6324 6510 6572



 */
public class D {
	public static void gen() {
		int n = 100, r = 62;
		System.out.println(n + " " + r);
		int[] ls = new int[n], ts = new int[n];
		for(int i=0;i<n;i++) {
			ts[i] = (int)(Math.random()*200);
			ls[i] = (int)(Math.random()*ts[i]); // T >= L, L <= T
		}
		for(int i=0;i<n;i++)
			System.out.print(ls[i] + " ");
		System.out.println();
		for(int i=0;i<100;i++)
			System.out.print(ts[i] + " ");
		System.out.println();
	}
	public static void main(String[] args) throws IOException {
//		gen();
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		long r = in.nextLong();
		long[] ls = new long[n], ts = new long[n];
		for (int i = 0; i < n; i++) {
			ls[i] = in.nextLong();
		}
		for (int i = 0; i < n; i++) {
			ts[i] = in.nextLong();
		}

		long k = 0;
		long leftoverBoost = 0;
		long time = 0;
		ArrayList<Long> ans = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			// System.out.println(i + ": t=" + time);
			long T = ts[i], L = ls[i];
			if (T < L) {
				k = -1;
				break;
			}

			// long boostsNeeded = ls[i]-leftoverBoost)
			long b = Math.min(L, leftoverBoost);
			T -= b;
			L -= b;
			time += b;
			leftoverBoost -= b;
			if (leftoverBoost == 0) {
				long boostTimeNeeded = 2 * L - T; // 2*L-T <= B
//				System.out.println(i + "th bridge has length " + L + ", max time " + T);
				if (boostTimeNeeded < 0)
					boostTimeNeeded = 0;
				T -= boostTimeNeeded;
				L -= boostTimeNeeded;
				time += 2 * L;
				// System.out.println("using " + ((boostTimeNeeded+r-1)/r) + "
				// boosts at t=" + time);
				long count = (boostTimeNeeded + r - 1) / r;
				if (k + count <= 100000) {
					long left = boostTimeNeeded;
//					System.out.println("boosting for " + left + " seconds, walking for " + walkTime + " seconds gives " + (left+2*walkTime));
					for (int iter = 0; iter < count; iter++) {
						long boost = Math.min(left, r);
						ans.add(time);
						left -= boost;
						// System.out.println("add " + boost);
						time += boost;
						k++;
					}
				} else {
					time += boostTimeNeeded;
					k += count;
				}
				long last = boostTimeNeeded % r;
				leftoverBoost = (r - last) % r;
			}
		}
		out.println(k);
		if (k <= 100000 && k >= 0) {
			for (int i = 0; i < ans.size(); i++) {
				if (i != 0)
					out.print(' ');
				out.print(ans.get(i));
			}
			out.println();
		}
		out.close();

	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String next() throws IOException {
			while (!st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return st.nextToken();
		}
	}
}
