#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y, k;
  point() {}
  point(int tx, int ty, int tk) : x(tx), y(ty), k(tk) {}
  int operator<(const point p) const {
    if (x != p.x) return x < p.x;
    if (y != p.y) return y < p.y;
    return k < p.k;
  }
} p[201997];
int c, h, ans[201997] = {};
struct tree {
  int l, r, v;
  tree() {}
  tree(int tl, int tr) : l(tl), r(tr), v(2147483647) {}
} t1[201997 << 2], t2[201997 << 2];
void build(tree* t, int l, int r, int i) {
  t[i] = tree(l, r);
  if (l == r) return;
  int mid = (l + r) >> 1;
  build(t, l, mid, i << 1);
  build(t, mid + 1, r, (i << 1) + 1);
}
void insert(tree* t, int x, int v, int i) {
  if (t[i].l == t[i].r) {
    t[i].v = min(t[i].v, v);
    return;
  }
  int mid = (t[i].l + t[i].r) >> 1;
  if (x <= mid)
    insert(t, x, v, i << 1);
  else
    insert(t, x, v, (i << 1) + 1);
  t[i].v = min(t[i << 1].v, t[(i << 1) + 1].v);
}
int query(tree* t, int l, int r, int i) {
  if (l > t[i].r || r < t[i].l) return 2147483647;
  if (l <= t[i].l && t[i].r <= r) return t[i].v;
  return min(query(t, l, r, (i << 1)), query(t, l, r, (i << 1) + 1));
}
set<int> st;
map<int, int> mp;
void solve() {
  int cnt = 0, res = 2147483647, pos = -1;
  set<int>::iterator it;
  for (it = st.begin(); it != st.end(); it++) mp[*it] = ++cnt;
  sort(p, p + c + h);
  build(t1, 1, cnt, 1);
  build(t2, 1, cnt, 1);
  for (int i = 0; i < c + h; i++) {
    if (p[i].k == 0) {
      insert(t1, mp[p[i].y], p[i].x + p[i].y, 1);
      insert(t2, mp[p[i].y], p[i].x - p[i].y, 1);
    } else {
      int d1 = query(t1, 1, mp[p[i].y], 1);
      int d2 = query(t2, mp[p[i].y] + 1, cnt, 1);
      if (d1 != 2147483647) ans[i] = max(ans[i], p[i].x + p[i].y - d1);
      if (d2 != 2147483647) ans[i] = max(ans[i], p[i].x - p[i].y - d2);
    }
  }
  build(t1, 1, cnt, 1);
  build(t2, 1, cnt, 1);
  for (int i = c + h - 1; i >= 0; i--) {
    if (p[i].k == 0) {
      insert(t1, mp[p[i].y], -p[i].x - p[i].y, 1);
      insert(t2, mp[p[i].y], p[i].y - p[i].x, 1);
    } else {
      int d1 = query(t1, mp[p[i].y] + 1, cnt, 1);
      int d2 = query(t2, 1, mp[p[i].y], 1);
      if (d1 != 2147483647) ans[i] = max(ans[i], -p[i].x - p[i].y - d1);
      if (d2 != 2147483647) ans[i] = max(ans[i], p[i].y - p[i].x - d2);
    }
  }
  for (int i = 0; i < c + h; i++)
    if (p[i].k && res > ans[i]) res = min(res, ans[i]), pos = p[i].k;
  cout << res << endl << pos << endl;
}
int main() {
  int n, m, x, y;
  cin >> n >> m >> c;
  for (int i = 0; i < c; i++)
    scanf("%d%d", &x, &y), p[i] = point(x, y, 0), st.insert(y);
  cin >> h;
  for (int i = 0; i < h; i++)
    scanf("%d%d", &x, &y), p[i + c] = point(x, y, i + 1), st.insert(y);
  solve();
  return 0;
}
