Nobody knows, but N frogs live in Chef's garden.
Now they are siting on the X-axis and want to speak to each other. One frog can send a message to another one if the distance between them is less or equal to K. 
Chef knows all P pairs of frogs, which want to send messages. Help him to define can they or not! 
Note : More than 1 frog can be on the same point on the X-axis.
 

Input

The first line contains three integers N, K and P. 
 The second line contains N space-separated integers A1, A2, ..., AN denoting the x-coordinates of frogs". 
 Each of the next P lines contains two integers A and B denoting the numbers of frogs according to the input. 

 

Output

For each pair print "Yes" without a brackets if frogs can speak and "No" if they cannot. 

 

Constraints

1 ≤ N, P ≤ 10^5
0 ≤ Ai, K ≤ 10^9
1 ≤ A, B ≤ N

 

Example
Input:
5 3 3
0 3 8 5 12
1 2
1 3
2 5

Output:
Yes
Yes
No

 


Explanation
For pair (1, 2) frog 1 can directly speak to the frog 2 as the distance between them is 3 - 0 = 3 <= K . 
For pair (1, 3) frog 1 can send a message to frog 2, frog 2 can send it to frog 4 and it can send it to frog 3.
For pair (2, 5) frogs can't send a message under current constraints.
def createFrogMap (frogs, distance):
    table = {}
    frogs.sort()
    frog = 1
    peer = 0
    reset = 0
    
    d = 0
    table[frogs[0]] = 0
    while frog < len(frogs):
        if (distance == 0):
            #print frog
            table[frogs[frog]] = 0
            frog += 1
            continue
        
        if reset == 1 and frog > 1:
            peer = frog - 1
            reset = 0
        
        d = frogs[frog] - frogs[frog - 1]
        if d < 0:
            d = -d
        
        if d > distance:
            reset = 1
            while peer <= frog :
                #print frogs[peer]
                table[frogs[peer]] = frogs[frog - 1]
                peer += 1
        elif frog == len(frogs) - 1:
            while peer <= frog :
                table[frogs[peer]] = frogs[frog]
                peer += 1
        frog += 1

    return table
    
params = raw_input().split()
num = int(params[0])
distance = int(params[1])    
pairs = int(params[2]) 

frogs = []

frogLookup = []
values = raw_input().split()
for i in values:
    frogs.append(int(i))
    frogLookup.append(int(i))
    
    
table = createFrogMap(frogs, distance)
#print table
#print frogs

#for i in range(0, num):
#    print i, frogs[0], frogLookup[i], table[frogLookup[i]]
 
     
    
while pairs > 0:
    f1, f2 = raw_input().split()
    f1 = int(f1)
    f2 = int(f2)
    if f1 == 0 or f2 == 0 or f1 > num or f2 > num:
        #print "No"
        pairs -= 1
        continue
    f1 = frogLookup[f1 - 1]
    f2 = frogLookup[f2 - 1]
    if (f1 > f2):
        t = f2
        f2 = f1
        f1 = t
    if f1 == f2 or (f1 in table and table[f1] >= f2):
        print "Yes"
    else:
        print "No"
    
    pairs -= 1