#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int a[N], b[N];
int main() {
  int i, j, n, m, k, t, x, y, p;
  long long ax, ay, tx, ty;
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; i++) scanf("%d", &a[i]);
    scanf("%d", &m);
    for (i = 0; i < m; i++) scanf("%d", &b[i]);
    sort(a, a + n);
    sort(b, b + m);
    ax = n * 2, ay = m * 2;
    for (i = 0; i < n; i++) {
      tx = (n - i) * 3 + i * 2;
      p = lower_bound(b, b + m, a[i]) - b;
      ty = (m - p) * 3 + p * 2;
      if (tx - ty > ax - ay || (tx - ty) == (ax - ay) && tx > ax)
        ax = tx, ay = ty;
    }
    printf("%I64d:%I64d\n", ax, ay);
  }
  return 0;
}
