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

long long kr(pair<long long,long long> p1, pair<long long,long long> p2)
{
    return (p1.first - p2.first)*(p1.first - p2.first)
    +(p1.second - p2.second)*(p1.second - p2.second);
}
int main()
{
    long long n,m,k,x,y;
    cin >> n >> m >> k;
    vector<pair<long long,long long>> mars;
    vector<pair<long long,long long>> nis;
    for ( int i = 0 ; i < n ; i++)
    {
        cin >> x >> y;
        nis.push_back(make_pair(x,y));
    }
    for ( int i = 0 ; i < m ; i++)
    {
        cin >> x >> y;
        mars.push_back(make_pair(x,y));
    }
    if ( nis[0].first > mars[m-1].first)
    {
        long long maxr = 0;
        for ( int i = 0 ; i < k ; i++)
        {
            maxr = max(maxr,kr(mars[m-k-i],nis[i]));
        }
        cout << maxr << endl;
        for ( int i = 0 ; i < k ; i++)
        {
            cout << i << " " << m-k-i;
        }
    }
    else if ( mars[0].first > nis[n-1].first)
    {
        long long maxr = 0;
        for ( int i = 0 ; i < k ; i++)
        {
            maxr = max(maxr,kr(nis[n-k-i],mars[i]));
        }
        cout << maxr << endl;
        for ( int i = 0 ; i < k ; i++)
        {
            cout << n-k-i << " " << i;
        }
    }
    else if ( m <= 1000 && n <= 1000)
    {
        long long res;
        bool b = true;
        int rn = 0,rm = 0;
        for ( int i = 0 ; i <= n - k ; i++)
        {
            for ( int j = 0 ; j <= m - k ; j++)
            {
                long long maxr = 0;
                for ( int o = 0 ; o < k ; o++) maxr = max(maxr,kr(nis[i + o],mars[j+o]));
                if ( ((b==false) && (maxr < res)) || b == true)
                {
                    rn = i;
                    rm = j;
                    res = maxr;
                    b = false;
                }
            }
        }
        cout << res << endl;
        for ( int i = 1 ; i <= k ; i++)
            cout << rn + i << " " << rm + i << endl;
    }
    else
    {
        int rn = -1,rm = -1;
        long long l = -1;
        long long r = max(kr(mars[0],nis[n-1]),kr(mars[m-1],nis[0])) + 1;
        long long res = r;
        while(r - l > 1)
        {
            long long mid = (r-l)/2 + l;
            bool nasli = false;
            for ( int i = 0 ; i < n ; i++)
            {
                int l2 = 0;
                int r2 = m-1;
                while(r2 - l2 > 1)
                {
                    int mid2 = (r2-l2)/2 + l2;
                    if ( kr(nis[i],mars[mid2])<= mid)
                    {
                        nasli = true;
                        rn = i;
                        rm = mid2;
                        res = mid;
                        i = n;
                        l2 = r2;
                    }
                    else
                    {
                        if ( kr(nis[i],mars[l2]) < kr(nis[i],mars[l2])) l2 = mid2;
                        else r2 = mid2;
                    }
                }
            }
            if ( nasli) r = mid;
            else l = mid;
        }
        cout << res << endl;
        cout << rn + 1 << " " << rm + 1;
    }
}