#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iomanip>
#include <stdio.h>
#include <set>
#include <unordered_set>
#include <bitset>
#include <map>
#include <unordered_map>
#include <queue>
#include <deque>
#include <vector>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define ii pair<int,int>
#define pli pair<ll,int>
#define pll pair<ll,ll>
#define pil pair<int,ll>
#define plii pair<ll,pair<int,int>>
#define heapmax(type) priorpy_queue<type>
#define heapmin(type) priorpy_queue<type,vector<type>,greater<type>>
#define ordered_multiset tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_starttistics_node_update>
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_starttistics_node_update>
#define FASTIO ios::sync_with_stdio(NULL); cin.tie(NULL); cout.tie(NULL);
#define sz(x) (int)x.size()
#define all(x) (x).begin(),(x).end()
#define getbp(mask,i) ((mask >> i) & 1)
const ll mod = 1e9 + 7;
const ld PI = acos(-1);
const int N = 2e5 + 100;
const int N_Trie = 1e5;
const int N_ST = 2e5 + 10;
const int N_BIT = 2e5 + 10;
const int LIM = 1e7; // N_Prime
const int N_MST = 1e5; // N of Merge Sort Tree
const int N_Hash = 2e6 + 10;
// sort(all(V));
// V.res2ize(unique(all(V)) - V.begin());*/
struct Trie_Number{
struct DT{
ii c[2];
};
DT trie[32*N_Trie];
bool vve[33];
int pw[32] , am = 0;
void Built_PW(){
pw[0] = 1;
for (int i = 1; i < 32; i++) pw[i] = pw[i - 1] * 2;
}
void _res2et(){
memset(vve,0,sizeof(vve));
memset(trie,0,sizeof(trie));
}
void _change(int x){
int p = 0;
while (x > 0){
vve[++p] = x % 2;
x /= 2;
}
while (p < 32) vve[++p] = 0;
}
void _add(int x){
_change(x);
int node = 0;
for (int i = 32; i >= 1; i--){
int w = vve[i];
if (!trie[node].c[w].fi) trie[node].c[w].fi = ++am;
trie[node].c[w].se++;
if (i > 1) node = trie[node].c[w].fi;
}
}
void _delete(int x){
_change(x);
int node = 0;
for (int i = 32; i >= 1; i--){
int w = vve[i];
if (!trie[node].c[w].fi){
return;
}
if (trie[node].c[w].se == 0){
return;
}
if (i > 1) node = trie[node].c[w].fi;
}
node = 0;
for (int i = 32; i >= 1; i--){
int w = vve[i];
// if (trie[node].c[w].se > 0)
trie[node].c[w].se--;
if (i > 1) node = trie[node].c[w].fi;
}
}
int _get(int k){
int node = 0 , res2 = 0;
for (int i = 32; i >= 1; i--){
if (k <= trie[node].c[0].se){
if (!trie[node].c[0].se) return -1;
node = trie[node].c[0].fi;
}
else{
if (!trie[node].c[1].se) return -1;
k = k - trie[node].c[0].se;
node = trie[node].c[1].fi;
res2 = res2 + pw[i - 1];
}
}
return res2;
}
};
ll gcd(ll a, ll b) {
if (b == 0) return a;
else return gcd(b, a % b);
}
ll snt[LIM + 2];
void Sieve() {
for(ll i = 1; i <= LIM; i++) snt[i] = 0;
for(ll i = 1; i <= LIM; i++) {
for(ll j = i; j <= LIM; j += i) {
snt[j] += i;
}
}
}
bool ktsnt(ll n) {
if (n <= 1) return false;
if (n <= 3) return true;
if (n % 2 == 0 || n % 3 == 0) return false;
for (int i = 5; i * i <= n; i += 6) {
if (n % i == 0 || n % (i + 2) == 0){
return false;
}
}
return true;
}
ll mul(ll a,ll b,ll c){ // O(log(min(a,b)))
if (a < b) swap(a,b);
ll res2 = 0;
a = a % c;
for (; b > 0; b >>= 1 , a = (a + a) % c)
if (b & 1) res2 = (res2 + a) % c;
return res2;
}
ll power(ll a,ll b,ll c){ // O(log(b))
ll res2 = 1;
a = a % c;
for (; b > 0; b >>= 1 , a = a * a % c)
if (b & 1) res2 = res2 * a % c;
return res2;
}
ll power_mul(ll a,ll b,ll c){ // O(log(b)^2)
ll res2 = 1;
a = a % c;
for (; b > 0; b >>= 1 , a = mul(a,a,c))
if (b & 1) res2 = mul(res2,a,c);
return res2;
}
void file(const string FILE){
if (fopen((FILE + ".INP").c_str(),"r")){
freopen((FILE + ".INP").c_str(), "r", stdin);
freopen((FILE + ".OUT").c_str(), "w", stdout);
}
}
void solve(){
int n, q, l;
cin >> n >> q >> l;
vector<pair<int, int>> p(N);
for (int i = 1; i <= n; i++) {
int x, y;
cin >> x >> y;
p[i] = make_pair(x, y);
}
while(q--){
int z;
cin >> z;
int cnt = 0;
for (int j = 1; j <= n; j++) {
int v = abs(p[j].first - z) + abs(p[j].second);
if (v <= l) {
cnt++;
}
else{
break;
}
}
cout << cnt << "\n";
}
}
int main(){
//file("sqrt");
FASTIO;
int t = 1;
//cin >> t;
while(t--){
solve();
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8Y3N0cmluZz4KI2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8aW9tYW5pcD4KI2luY2x1ZGUgPHN0ZGlvLmg+CgojaW5jbHVkZSA8c2V0PgojaW5jbHVkZSA8dW5vcmRlcmVkX3NldD4KI2luY2x1ZGUgPGJpdHNldD4KI2luY2x1ZGUgPG1hcD4KI2luY2x1ZGUgPHVub3JkZXJlZF9tYXA+CiNpbmNsdWRlIDxxdWV1ZT4KI2luY2x1ZGUgPGRlcXVlPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8ZXh0L3BiX2RzL2Fzc29jX2NvbnRhaW5lci5ocHA+CiNpbmNsdWRlIDxleHQvcGJfZHMvdHJlZV9wb2xpY3kuaHBwPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdXNpbmcgbmFtZXNwYWNlIF9fZ251X3BiZHM7CgojZGVmaW5lIGxsIGxvbmcgbG9uZwojZGVmaW5lIGxkIGxvbmcgZG91YmxlCiNkZWZpbmUgZmkgZmlyc3QKI2RlZmluZSBzZSBzZWNvbmQKI2RlZmluZSBwYiBwdXNoX2JhY2sKI2RlZmluZSBtcCBtYWtlX3BhaXIKI2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gPSAxZTc7IC8vIE5fUHJpbWUKY29uc3QgaW50IE5fTVNUID0gMWU1OyAvLyBOIG9mIE1lcmdlIFNvcnQgVHJlZQpjb25zdCBpbnQgTl9IYXNoID0gMmU2ICsgMTA7CgovLyBzb3J0KGFsbChWKSk7Ci8vIFYucmVzMml6ZSh1bmlxdWUoYWxsKFYpKSAtIFYuYmVnaW4oKSk7Ki8KCnN0cnVjdCBUcmllX051bWJlcnsKICAgIHN0cnVjdCBEVHsKICAgICAgICBpaSBjWzJdOwogICAgfTsKICAgIERUIHRyaWVbMzIqTl9UcmllXTsKICAgIGJvb2wgdnZlWzMzXTsKICAgIGludCBwd1szMl0gLCBhbSA9IDA7CiAgICB2b2lkIEJ1aWx0X1BXKCl7CiAgICAgICAgcHdbMF0gPSAxOwogICAgICAgIGZvciAoaW50IGkgPSAxOyBpIDwgMzI7IGkrKykgcHdbaV0gPSBwd1tpIC0gMV0gKiAyOwogICAgfQogICAgdm9pZCBfcmVzMmV0KCl7CiAgICAgICAgbWVtc2V0KHZ2ZSwwLHNpemVvZih2dmUpKTsKICAgICAgICBtZW1zZXQodHJpZSwwLHNpemVvZih0cmllKSk7CiAgICB9CiAgICB2b2lkIF9jaGFuZ2UoaW50IHgpewogICAgICAgIGludCBwID0gMDsKICAgICAgICB3aGlsZSAoeCA+IDApewogICAgICAgICAgICB2dmVbKytwXSA9IHggJSAyOwogICAgICAgICAgICB4IC89IDI7CiAgICAgICAgfQogICAgICAgIHdoaWxlIChwIDwgMzIpIHZ2ZVsrK3BdID0gMDsKICAgIH0KICAgIHZvaWQgX2FkZChpbnQgeCl7CiAgICAgICAgX2NoYW5nZSh4KTsKICAgICAgICBpbnQgbm9kZSA9IDA7CiAgICAgICAgZm9yIChpbnQgaSA9IDMyOyBpID49IDE7IGktLSl7CiAgICAgICAgICAgIGludCB3ID0gdnZlW2ldOwogICAgICAgICAgICBpZiAoIXRyaWVbbm9kZV0uY1t3XS5maSkgdHJpZVtub2RlXS5jW3ddLmZpID0gKythbTsKICAgICAgICAgICAgdHJpZVtub2RlXS5jW3ddLnNlKys7CiAgICAgICAgICAgIGlmIChpID4gMSkgbm9kZSA9IHRyaWVbbm9kZV0uY1t3XS5maTsKICAgICAgICB9CiAgICB9CiAgICB2b2lkIF9kZWxldGUoaW50IHgpewogICAgICAgIF9jaGFuZ2UoeCk7CiAgICAgICAgaW50IG5vZGUgPSAwOwogICAgICAgIGZvciAoaW50IGkgPSAzMjsgaSA+PSAxOyBpLS0pewogICAgICAgICAgICBpbnQgdyA9IHZ2ZVtpXTsKICAgICAgICAgICAgaWYgKCF0cmllW25vZGVdLmNbd10uZmkpewogICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICh0cmllW25vZGVdLmNbd10uc2UgPT0gMCl7CiAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGkgPiAxKSBub2RlID0gdHJpZVtub2RlXS5jW3ddLmZpOwogICAgICAgIH0KICAgICAgICBub2RlID0gMDsKICAgICAgICBmb3IgKGludCBpID0gMzI7IGkgPj0gMTsgaS0tKXsKICAgICAgICAgICAgaW50IHcgPSB2dmVbaV07CiAgICAgICAgICAgIC8vIGlmICh0cmllW25vZGVdLmNbd10uc2UgPiAwKQogICAgICAgICAgICAgICAgdHJpZVtub2RlXS5jW3ddLnNlLS07CiAgICAgICAgICAgIGlmIChpID4gMSkgbm9kZSA9IHRyaWVbbm9kZV0uY1t3XS5maTsKICAgICAgICB9CiAgICB9CiAgICBpbnQgX2dldChpbnQgayl7CiAgICAgICAgaW50IG5vZGUgPSAwICwgcmVzMiA9IDA7CiAgICAgICAgZm9yIChpbnQgaSA9IDMyOyBpID49IDE7IGktLSl7CiAgICAgICAgICAgIGlmIChrIDw9IHRyaWVbbm9kZV0uY1swXS5zZSl7CiAgICAgICAgICAgICAgICBpZiAoIXRyaWVbbm9kZV0uY1swXS5zZSkgcmV0dXJuIC0xOwogICAgICAgICAgICAgICAgbm9kZSA9IHRyaWVbbm9kZV0uY1swXS5maTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlewogICAgICAgICAgICAgICAgaWYgKCF0cmllW25vZGVdLmNbMV0uc2UpIHJldHVybiAtMTsKICAgICAgICAgICAgICAgIGsgPSBrIC0gdHJpZVtub2RlXS5jWzBdLnNlOwogICAgICAgICAgICAgICAgbm9kZSA9IHRyaWVbbm9kZV0uY1sxXS5maTsKICAgICAgICAgICAgICAgIHJlczIgPSByZXMyICsgcHdbaSAtIDFdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiByZXMyOwogICAgfQp9OwpsbCBnY2QobGwgYSwgbGwgYikgewogIGlmIChiID09IDApIHJldHVybiBhOwogIGVsc2UgcmV0dXJuIGdjZChiLCBhICUgYik7Cn0KbGwgc250W0xJTSArIDJdOwp2b2lkIFNpZXZlKCkgewogIGZvcihsbCBpID0gMTsgaSA8PSBMSU07IGkrKykgc250W2ldID0gMDsKICBmb3IobGwgaSA9IDE7IGkgPD0gTElNOyBpKyspIHsKICAgIGZvcihsbCBqID0gaTsgaiA8PSBMSU07IGogKz0gaSkgewogICAgICBzbnRbal0gKz0gaTsKICAgIH0KICB9Cn0KYm9vbCBrdHNudChsbCBuKSB7CiAgaWYgKG4gPD0gMSkgcmV0dXJuIGZhbHNlOwogIGlmIChuIDw9IDMpIHJldHVybiB0cnVlOwogIGlmIChuICUgMiA9PSAwIHx8IG4gJSAzID09IDApIHJldHVybiBmYWxzZTsKICBmb3IgKGludCBpID0gNTsgaSAqIGkgPD0gbjsgaSArPSA2KSB7CiAgICBpZiAobiAlIGkgPT0gMCB8fCBuICUgKGkgKyAyKSA9PSAwKXsKICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQogIH0KICByZXR1cm4gdHJ1ZTsKfQpsbCBtdWwobGwgYSxsbCBiLGxsIGMpeyAvLyBPKGxvZyhtaW4oYSxiKSkpCiAgICBpZiAoYSA8IGIpIHN3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BjaW4gPj4geCA+PiB5OwogICAgICAgIHBbaV0gPSBtYWtlX3BhaXIoeCwgeSk7CiAgICB9CiAgICB3aGlsZShxLS0pewogICAgICAgIGludCB6OwogICAgICAgIGNpbiA+PiB6OwogICAgICAgIGludCBjbnQgPSAwOwogICAgICAgIGZvciAoaW50IGogPSAxOyBqIDw9IG47IGorKykgewogICAgICAgICAgICBpbnQgdiA9IGFicyhwW2pdLmZpcnN0IC0geikgKyBhYnMocFtqXS5zZWNvbmQpOwogICAgICAgICAgICBpZiAodiA8PSBsKSB7CiAgICAgICAgICAgICAgICBjbnQrKzsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgY291dCA8PCBjbnQgPDwgIlxuIjsKICAgIH0KfQppbnQgbWFpbigpewogIC8vZmlsZSgic3FydCIpOwogIEZBU1RJTzsKICBpbnQgdCA9IDE7CiAgLy9jaW4gPj4gdDsKICB3aGlsZSh0LS0pewogICAgc29sdmUoKTsKICB9CiAgcmV0dXJuIDA7Cn0=