#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds;

using namespace std;
template <class T> using indexed_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
#define pb push_back
template<class T> using pqg = priority_queue<T,vector<T>,greater<T>>;
const char nl = '\n';
const long long int ll_MAX=9223372036854775807;


int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, m, k;
    cin>>n>>m>>k;
    int x1[n];int y1[n];
    int x2[m];int y2[m];
    for(int i =0;i<n;i++){
        cin>>x1[i]>>y1[i];
    }
    for(int j =0;j<m;j++){
        cin>>x2[j]>>y2[j];
    }
    long long int maxi = ll_MAX;
    int i1 =0;
    int i2 = 0;
    for(int i =0;i<n;i++){
        for(int j =0;j<m;j++){
                long long int prvi = (x1[i]-x2[j])*(x1[i]-x2[j]);
        long long int drugi = (y1[i]-y2[j])*(y1[i]-y2[j]);
        long long int zbir = prvi +drugi;
            if(zbir<maxi){
                maxi = zbir;
                i1 = i;
                i2 = j;
            }
        }


    }
    cout<<maxi<<nl;
    cout<<i1+1<<" "<<i2+1;
    return 0;
}