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

int n, m, k;

typedef struct brod {
	long long x, y;
	int idx;
} brod;

bool comp(brod a, brod b) {
	if(a.x != b.x)
		return a.x < b.x;
	return a.y < b.y;
}

brod nis[200010], mars[200010];

long long dist(int i, int j) {
	return ((mars[i].x - nis[j].x) * (mars[i].x - nis[j].x) + (mars[i].y - nis[j].y) * (mars[i].y - nis[j].y));
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	cin >> n >> m >> k;
	for(int i = 0; i < n; i++) {
		cin >> nis[i].x >> nis[i].y;
		nis[i].idx = i+1;
	}
	for(int i = 0; i < m; i++) {
		cin >> mars[i].x >> mars[i].y;
		mars[i].idx = i+1;
	}
	sort(nis, nis+n, comp);
	sort(mars, mars+m, comp);
	int l = 0;
	long long mindist = LLONG_MAX;
	pair<int, int> par;
	for(int i = 0; i < n; i++) {
		while(l < m-1) {
			if(dist(l+1, i) < dist(l, i)) {
				l++;
			}
			else
				break;
		}
		if(dist(l, i) < mindist) {
			mindist = dist(l, i);
			par.first = nis[i].idx, par.second = mars[l].idx;
		}
	}
	l = m-1;
	for(int i = 0; i < n; i++) {
		while(l > 0) {
			if(dist(l-1, i) < dist(l, i)) {
				l--;
			}
			else
				break;
		}
		if(dist(l, i) < mindist) {
			mindist = dist(l, i);
			par.first = nis[i].idx, par.second = mars[l].idx;
		}
	}
	cout << mindist << '\n';
	cout << par.first << ' ' << par.second << '\n';

	return 0;
}