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 $A_1$, $A_2$, …, $A_N$ 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 \le N, P \le 10^5$
- $0 \le A_i, K \le 10^9$
- $1 \le A, B \le N$

-----Example-----

-----Sample Input:-----
5 3 3
0 3 8 5 12
1 2
1 3
2 5

-----Sample 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 \le 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.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "class union_find:\n def __init__(self,N):\n  self.parent = {}\n  self.rank = []\n  for i in range(N):\n   self.parent[i] = i\n   self.rank.append(0)\n\n def find(self,x):\n  y = x\n  while(x!=self.parent[x]):\n   x = self.parent[x]\n  self.parent[y] = x\n  return x\n\n def union(self,x,y):\n  px = self.find(x)\n  py = self.find(y)\n  if(px==py):\n   return\n  else:\n   if(self.rank[px]>self.rank[py]):\n    self.parent[py] = px\n   elif(self.rank[px]<self.rank[py]):\n    self.parent[px] = py\n   else:\n    self.parent[py] = px\n    self.rank[px] += 1\n\nN,K,P = [int(i) for i in input().split()]\nX = [int(i) for i in input().split()]\nans = []\n\nuf = union_find(N)\n\nY = []\nfor i in range(N):\n Y.append((X[i],i))\nY.sort()\n\nfor i in range(N-1):\n if(Y[i+1][0]-Y[i][0]<=K):\n  uf.union(Y[i][1],Y[i+1][1])\n\nA = []\nB = []\n\nfor i in range(P):\n a,b = [int(i) for i in input().split()]\n A.append(a-1)\n B.append(b-1)\n\nfor i in range(P):\n pa = uf.find(A[i])\n pb = uf.find(B[i])\n if(pa==pb):\n  ans.append('Yes')\n else:\n  ans.append('No')\n\nfor i in ans:\n print(i)\n"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 17065