#include <bits/stdc++.h>
using namespace std;
long long sum, ans;
int x[50], y[50];
int main() {
  int n, m, l, r, u, v;
  cin >> u >> v;
  cin >> n;
  for (int i = 1; i <= 4; i++) {
    x[i] = -1e9 + 7;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &l, &r);
    x[1] = max(x[1], -l - r);
    x[2] = max(x[2], l - r);
    x[3] = max(x[3], l + r);
    x[4] = max(x[4], -l + r);
  }
  cin >> m;
  int ans = 2e9 + 7, res;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &l, &r);
    int sum = 0;
    sum = max(sum, x[1] + l + r);
    sum = max(sum, x[2] - l + r);
    sum = max(sum, x[3] - l - r);
    sum = max(sum, x[4] + l - r);
    if (sum < ans) {
      ans = sum;
      res = i;
    }
  }
  cout << ans << endl << res << endl;
  return 0;
}
