#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define mp make_pair
#define FI first
#define SE second

#define debug(x) cout << #x << " = " << x <<endl
#define floatdec 1e-8

const double pi=asin(1)*2;
const int maxn = 111111;
typedef pair<double, double> pii;
typedef pair<pii, pii> ppp;
pii seek[maxn], hide[maxn];
ppp line[maxn];
ppp ab[maxn],l[100000];
int len;

double getangle(pii t){
	if (t.first == 0 ) return t.second > 0 ? pi/ 2: pi/ 2.0 * 3.0;;
	double T = atan2(t.second,t.first);
	if (T<0) T += 2*pi;
	return T;
}

double getangle(pii s,pii t){
	pii p=make_pair(t.first-s.first,t.second-s.second);
	return getangle(p);
}

double dis(double x,double y){
	return sqrt(x*x+y*y);
}

double dis(pii a,pii b){
	return dis(a.first-b.first,a.second-b.second);
}

double dis(pii a){
	return dis(a.first,a.second);
}

pii ptoxy(pii a){
	return make_pair(a.second*cos(a.first),a.second*sin(a.first));
}

pii xytop(pii a){
	return make_pair(getangle(a),dis(a.first,a.second));
}

bool morethan(ppp a,ppp b)
{
	if (a.first.first!=b.first.first) return a.first.first>b.first.first;
	if (a.second.first!=b.second.first) return a.second.first>b.second.first;
	if (a.first.second!=b.first.second) return a.first.second>b.first.second;
	return a.second.second>=b.second.second;
}

bool morethan(pii a,pii b)
{
	if (a.first!=b.first) return a.first>b.first;
	return a.second>b.second;
}

pii meetat(ppp a,ppp b)
{
	pii t;
	a = make_pair(ptoxy(a.first),ptoxy(a.second));
	b = make_pair(ptoxy(b.first),ptoxy(b.second));
	if (fabs(b.first.first-b.second.first)<floatdec) swap(a,b);
	if (fabs(a.first.first-a.second.first)<floatdec){
		t.first = a.first.first;
	}else{
		double k1=(a.second.second-a.first.second)/(a.second.first-a.first.first);			
		double k2=(b.second.second-b.first.second)/(b.second.first-b.first.first);	
		t.first = (k1*a.first.first - k2*b.first.first + b.first.second - a.first.second)/(k1-k2);	
	}
	t.second = (t.first - b.first.first) * (b.second.second - b.first.second)/(b.second.first - b.first.first) + b.first.second;
	return xytop(t);
}

bool inner(pii a,ppp b){
	pii c = meetat(mp(mp(0,0),a),b);
	return a.second<=c.second;
}

void upl(int n)
{
	ppp t=l[n];
	while (n>1 && morethan(l[n>>1],t))
	{
		l[n] = l[n>>1]; n >>= 1;
	}
	l[n] = t;
}

void downl(int n,int len)
{
	ppp t=l[n];
	while ((n<<1)<=len)
	{
		int i = n << 1;
		if (i+1<=len && morethan(l[i],l[i+1])) i++;
		if (morethan(t,l[i])){
			l[n] = l[i]; n = i;
		}else break;
	}
	l[n] = t;
}

void pushl(int *len,ppp a)
{
	l[++*len] = a;
	upl(*len);
}

ppp popl(int *len)
{
	ppp tmp = l[1]; l[1] = l[*len]; l[*len] = tmp;
	downl(1,*len-1);
	return l[(*len)--];
}

int main()
{
	int s,k, w;
	freopen("H.in","r",stdin);
	while (scanf("%d %d %d",&s,&k,&w)!=EOF){
		int i;
		for (i=1;i<=s;i++){
			scanf("%lf %lf",&seek[i].first,&seek[i].second);
			hide[i] = seek[i];
		}
		for (;i<=k;i++){
			scanf("%lf %lf",&hide[i].first,&hide[i].second);
		}
		for (int i=1;i<=w;i++){
			scanf("%lf %lf %lf %lf",&line[i].first.first,&line[i].first.second,&line[i].second.first,&line[i].second.second);
		}
		for (int i=1;i<=s;i++){
			memset(l,0,sizeof(l));
			memset(ab,0,sizeof(ab));
			pii origin=make_pair(0,0);
			pii zero=make_pair(0,100000000);
			pii twopi=make_pair(2*pi,100000000);
			len = 0;
			for (int j=1;j<=w;j++){
				pii a=make_pair(getangle(seek[i],line[j].first),dis(seek[i],line[j].first));
				pii b=make_pair(getangle(seek[i],line[j].second),dis(seek[i],line[j].second));
				if (a.first>b.first) swap(a,b);
				if (b.first-a.first>=pi){
					pii t = meetat(make_pair(origin,zero),make_pair(a,b));
					t.first = 0;
					pushl(&len,make_pair(t,a));
					t.first = 2*pi;
					pushl(&len,make_pair(b,t));
				}else{
					pushl(&len,make_pair(a,b));
				}
			}
			int tot=0;
			ab[++tot] = make_pair(zero,zero);
			if (len){
				ppp t1 = popl(&len),t2;
				pii t;
				while (len)
				{
					t2 = popl(&len);
					if (t2.first.first-t1.second.first>=-floatdec)
					{
						ab[++tot] = t1;
						t1 = t2;
						continue;
					}
					if (t2.first.first>t1.first.first)
					{
						t = meetat(make_pair(origin,t2.first),t1);
						ab[++tot] = make_pair(t1.first,t);
						t1.first = t;
					}
					if (t2.second.first>t1.second.first)
					{
						t = meetat(make_pair(origin,t1.second),t2);
						pushl(&len,make_pair(t,t2.second));
						t2.second = t;
					}else if (t1.second.first>t2.second.first)
					{
						t = meetat(make_pair(origin,t2.second),t1);
						pushl(&len,make_pair(t,t1.second));
						t1.second = t;
					}
					bool firstin = inner(t1.first,t2);
					bool secondin = inner(t1.second,t2);
					if (firstin ^ secondin){
						pii t = meetat(t1,t2);
						if (firstin){
							pushl(&len,make_pair(t,t2.second));
							t1 = make_pair(t1.first,t);
						}else{
							pushl(&len,make_pair(t,t1.second));
							t1 = make_pair(t2.first,t);
						}
					}else{
						if (!firstin) t1 = t2;
					}
				}
				ab[++tot] = t1;
			}
			ab[++tot] = make_pair(twopi,twopi);
			int sum=0;
			for (int j=1;j<=k;j++){
				if (i==j) continue;
				pii now=make_pair(getangle(seek[i],hide[j]),dis(seek[i],hide[j]));
				int l=1,r=tot,m;
				while (l<r-1){
					m = (l+r)>>1;
					if (now.first<ab[m].first.first) r=m;
					else l=m;
				}
				if ((now.first>ab[l].second.first) || ((now.first<=ab[l].second.first) && inner(now,ab[l])))
				{
					sum++;
				}
			}
			printf("%d\n",sum);
		}
	}
	return 0;
}
