#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define endl "\n"
///freopen("input.txt", "r", stdin);
///freopen("output.txt", "w", stdout);
void solve(){
    int n,m,k;
    cin>>n>>m>>k;

    vector<pair<int,int>>niz1(n);
    for(int i=0;i<n;i++){
        cin>>niz1[i].first>>niz1[i].second;
    }

    vector<pair<int,int>>niz2(m);
    for(int i=0;i<m;i++){
        cin>>niz2[i].first>>niz2[i].second;
    }

    ll ans=0;
    for(int i=n-1,j=k-1,x=0;i>=0&&x<k;i--,j--,x++){

        ll xovi=abs(niz1[i].first-niz2[j].first);
        ll yovi=abs(niz1[i].second-niz2[j].second);

        ll dist=xovi*xovi+yovi*yovi;
        ans=max(ans,dist);
    }
    cout<<fixed<<setprecision(4)<<(sqrt(ans))<<endl;
    for(int i=n-1,j=k-1,x=0;i>=0&&x<k;i--,j--,x++){
        cout<<i<<" "<<j<<endl;
    }
}
int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    int t=1;///cin>>t;
    while(t--)solve();
    return 0;
}