#include <bits/stdc++.h>
using namespace std;
const int INF = 2000000001;
int m1, m2, m3, m4;
int a, b;
int n, m, q;
int sol, mind, cd;
int main() {
  m1 = m2 = m3 = m4 = mind = INF;
  scanf("%d%d%d", &n, &m, &q);
  for (int i = 0; i < q; ++i) {
    scanf("%d%d", &a, &b);
    m1 = min(m1, a + b);
    m2 = min(m2, n - a + b);
    m3 = min(m3, n - a + m - b);
    m4 = min(m4, a + m - b);
  }
  scanf("%d", &q);
  for (int i = 0; i < q; ++i) {
    scanf("%d%d", &a, &b);
    cd = a + b - m1;
    cd = max(cd, n - a + b - m2);
    cd = max(cd, n - a + m - b - m3);
    cd = max(cd, a + m - b - m4);
    if (cd < mind) {
      sol = i + 1;
      mind = cd;
    }
  }
  printf("%d %d\n", mind, sol);
  return 0;
}
