#include <iostream>
#include <math.h>

using namespace std;

typedef struct {
    int x, y;
} coord;

int dist(coord a, coord b) {
    return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y);
}

int main()
{
    int n, m, k;
    scanf("%d %d %d", &n, &m, &k);
    coord an[n], am[m];
    for (int i=0; i<n; i++) {
        scanf("%d %d", &an[i].x, &an[i].y);
    }
    for (int i=0; i<m; i++) {
        scanf("%d %d", &am[i].x, &am[i].y);
    }
    pair<int, int> minDist[n];
    for (int i=0; i<n; i++) {
        pair<int,int> minLocalDist = {99999999, -1};
        for (int j=0; j<m; j++) {
            int localDist = dist(an[i], am[j]);
            if (localDist < minLocalDist.first) minLocalDist = {localDist, j};
        }
        //printf("AA%d ", minLocalDist.first);
        minDist[i] = minLocalDist;
    }

    int res=9999999, resi=0, localMaxDist=-1;
    for (int i=0; i<n; i++) {
        if (k+i>n) break;
        localMaxDist=-1;
        for (int j=i; j<k+i; j++) {
            if (minDist[j].first > localMaxDist) {
                localMaxDist = minDist[j].first;
            }
        }
        if (localMaxDist < res) {
            res = localMaxDist;
            resi = i;
        }
    }
    printf("%d\n", res);
    for (int i=resi; i<resi+k; i++) {
        // resi -> resi+k-1
        printf("%d %d\n", i+1, minDist[i].second+1);
    }

    return 0;
}