The Two-dimensional kingdom is going through hard times... This morning the Three-Dimensional kingdom declared war on the Two-dimensional one. This (possibly armed) conflict will determine the ultimate owner of the straight line.

The Two-dimensional kingdom has a regular army of *n* people. Each soldier registered himself and indicated the desired size of the bulletproof vest: the *i*-th soldier indicated size *a*<sub class="lower-index">*i*</sub>. The soldiers are known to be unpretentious, so the command staff assumes that the soldiers are comfortable in any vests with sizes from *a*<sub class="lower-index">*i*</sub> - *x* to *a*<sub class="lower-index">*i*</sub> + *y*, inclusive (numbers *x*, *y* ≥ 0 are specified). 

The Two-dimensional kingdom has *m* vests at its disposal, the *j*-th vest's size equals *b*<sub class="lower-index">*j*</sub>. Help mobilize the Two-dimensional kingdom's army: equip with vests as many soldiers as possible. Each vest can be used only once. The *i*-th soldier can put on the *j*-th vest, if *a*<sub class="lower-index">*i*</sub> - *x* ≤ *b*<sub class="lower-index">*j*</sub> ≤ *a*<sub class="lower-index">*i*</sub> + *y*.
The first input line contains four integers *n*, *m*, *x* and *y* (1 ≤ *n*, *m* ≤ 10<sup class="upper-index">5</sup>, 0 ≤ *x*, *y* ≤ 10<sup class="upper-index">9</sup>) — the number of soldiers, the number of vests and two numbers that specify the soldiers' unpretentiousness, correspondingly.

The second line contains *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) in non-decreasing order, separated by single spaces — the desired sizes of vests. 

The third line contains *m* integers *b*<sub class="lower-index">1</sub>, *b*<sub class="lower-index">2</sub>, ..., *b*<sub class="lower-index">*m*</sub> (1 ≤ *b*<sub class="lower-index">*j*</sub> ≤ 10<sup class="upper-index">9</sup>) in non-decreasing order, separated by single spaces — the sizes of the available vests.
5 3 0 0
1 2 3 3 4
1 3 5
2
1 1
3 2
3 3 2 2
1 5 9
3 5 7
3
1 1
2 2
3 3
1 1 0 0
1
1
1
1 1
1 1 0 0
1
2
0
2 3 1 4
1 5
1 2 2
1
1 1
20 30 1 4
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 4 4 4 5
1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5
20
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 15
14 16
15 17
16 18
17 19
18 20
19 21
20 22
33 23 17 2
1 1 2 2 2 3 3 3 3 3 3 4 4 4 4 4 5 5 5 6 6 7 7 7 8 8 8 8 8 9 9 10 10
1 1 3 3 4 4 4 5 5 6 6 6 7 8 8 8 8 8 8 9 9 10 10
23
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
12 10
13 11
14 12
17 13
20 14
21 15
22 16
23 17
24 18
25 19
26 20
27 21
28 22
29 23
2 2 1 4
1 4
3 6
2
1 1
2 2
20 20 1 4
1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 4 4 5 5
3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 6 6 7 7
20
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
20 20
33 23 17 2
1 1 1 2 3 3 3 3 3 4 4 4 4 5 6 6 6 6 6 6 7 7 7 7 7 8 8 8 8 8 8 10 10
10 10 10 11 12 12 12 12 12 13 13 13 13 14 15 15 15 15 15 15 16 16 16
5
26 1
27 2
28 3
32 4
33 5
1 1 1 2
783266931
783266932
1
1 1
2 3 1 4
1 1
3 3 4
2
1 1
2 2
20 30 1 4
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
20
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
20 20
33 23 17 2
1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5
10 10 10 10 10 10 10 11 11 11 11 11 11 11 12 12 12 12 12 12 13 13 13
0
10 1 1 1
1 1 1 5 5 7 7 8 8 8
3
0
10 1 2 1
1 2 5 8 9 9 9 10 10 10
7
1
4 1
1 1 2 1
7
8
1
1 1
1 1 0 2
9
7
0
2 2 0 2
2 8
3 5
1
1 1
2 2 1 0
5 5
6 7
0
2 2 3 0
8 9
1 5
1
1 2
n, m, x, y = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

u = []
v = []
i = j = 0
while i < n and j < m:
    if (a[i] - x <= b[j]) and (b[j] <= a[i] + y):
        u.append(i + 1)
        v.append(j + 1)
        i += 1
        j += 1
    elif (b[j] < a[i] - x):
        j += 1
    elif (b[j] > a[i] + y):
        i += 1
ans = len(u)

print(ans)
for i in range(ans):
    print(u[i], v[i])