#include <bits/stdc++.h>

using namespace std;

long long distanca(pair<long long, long long> a, pair<long long, long long> b){
    long long d = (a.first-b.first)*(a.first-b.first)+(a.second-b.second)*(a.second-b.second);
}

int main(){
    #define int long long
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n,m,k;
    cin>>n>>m>>k;
    pair<int, int> t1[n];
    pair<int, int> t2[m];
    for(int i=0;i<n;i++){
        int x,y;
        cin>>x>>y;
        t1[i] = {x,y};
    }
    for(int i=0;i<m;i++){
        int x,y;
        cin>>x>>y;
        t2[i] = {x,y};
    }
    int minn = 2e18;
    int u, v;
    for(int i=0;i<n;i++){
        int l = 0;
        int r = m-1;
        while(l<r){
            int mid = (l+r)/2;
            if(distanca(t1[i], t2[mid])<=distanca(t1[i], t2[mid+1])) r = mid;
            else l = mid+1;
        }
        minn = min(minn, distanca(t1[i], t2[l]));
        if(minn == distanca(t1[i], t2[l])){
            u = i+1;
            v = l+1;
        }
    }
    cout<<minn<<endl;
    cout<<u<<" "<<v<<endl;
}