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

int n, m, k;
pair<int, int> parovi[200010];

typedef struct brod {
	long long x, y;
	int idx;
} brod;

bool comp(brod a, brod b) {
	if(a.x != b.x)
		return a.x < b.x;
	return a.y < b.y;
}

brod nis[200010], mars[200010];

long long dist(int i, int j) {
	return ((mars[i].x - nis[j].x) * (mars[i].x - nis[j].x) + (mars[i].y - nis[j].y) * (mars[i].y - nis[j].y));
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	cin >> n >> m >> k;
	for(int i = 0; i < n; i++) {
		cin >> nis[i].x >> nis[i].y;
		nis[i].idx = i+1;
	}
	for(int i = 0; i < m; i++) {
		cin >> mars[i].x >> mars[i].y;
		mars[i].idx = i+1;
	}
	long long mindist = LLONG_MAX;
	pair<int, int> par;
	for(int i = 0; i < n-k; i++) {
		for(int j = 0; j < n-k; j++) {
			// i do i+k
			// j do j+k
			long long maxdist = 0;
			for(int y = 0; y < k; y++) {
				maxdist = max(maxdist, dist(i + y, j + y));
			}
			if(maxdist < mindist) {
				mindist = maxdist;
				par.first = i+1, par.second = j+1;
			}
		}
	}

	cout << mindist << '\n';
	for(int i = 0; i < k; i++) {
		cout << par.first + i << ' ' << par.second + i << '\n';
	}

	return 0;
}