#include <stdio.h>
int ax[100000], ay[100000];
int main(void){
	int an, bn, bx, by, r, i, cnt, dst;
	for( ; scanf("%d%d%d", &an, &bn, &r), an; ){
		r *= r * 16;
		for( i = an; i--; ){
			scanf("%d%d", ax + i, ay + i );
		}
		for( cnt = 0; bn--; ){
			scanf("%d%d", &bx, &by );
			for( i = an; i--; ){
				dst =
					  ( ax[i] - bx ) * ( ax[i] - bx )
					+ ( ay[i] - by ) * ( ay[i] - by );
				if( dst <= r ){	++cnt;	}
			}
		}
		printf("%d\n", cnt );
	}
	return 0;
}