#include <bits/stdc++.h>

using namespace std;

#define MAXN 200001
#define int long long

int n,m,k;
int x[MAXN],y[MAXN];
int x1[MAXN],y11[MAXN];

int32_t main()
{
    cin>>n>>m>>k;
    for (int i=1;i<=n;i++) cin>>x[i]>>y[i];
    for (int i=1;i<=m;i++) cin>>x1[i]>>y11[i];
    if (n<=10 and m<=10)
    {
        int answer=LLONG_MAX;int nis;vector<int> vec;
        for (int pos=1;pos+k-1<=n;pos++)
        {
            for (int pos1=1;pos1+k-1<=n;pos1++)
            {
                vector<int> perm;for (int i=pos1;i<pos1+k;i++) perm.push_back(i);
                int curranswer=-LLONG_MAX;
                for (int i=0;i<k;i++)
                {
                    int dist=(long long)(x[pos+i]-x1[perm[i]])*(x[pos+i]-x1[perm[i]])+(long long)(y[pos+i]-y11[perm[i]])*(y[pos+i]-y11[perm[i]]);
                    if (dist>curranswer) curranswer=dist;
                }
                if (curranswer<answer) {answer=curranswer;nis=pos;vec=perm;}
                while (next_permutation(perm.begin(),perm.end()))
                {
                    curranswer=-LLONG_MAX;
                    for (int i=0;i<k;i++)
                    {
                        int dist=(long long)(x[pos+i]-x1[perm[i]])*(x[pos+i]-x1[perm[i]])+(long long)(y[pos+i]-y11[perm[i]])*(y[pos+i]-y11[perm[i]]);
                        if (dist>curranswer) curranswer=dist;
                    }
                    if (curranswer<answer) {answer=curranswer;nis=pos;vec=perm;}
                }
            }
        }
        cout<<answer<<endl;
        for (int i=0;i<k;i++) cout<<nis+i<<" "<<vec[i]<<endl;
        return 0;
    }
}