#include <bits/stdc++.h>
const int maxn = 2e5 + 10;
int A[maxn], B[maxn], m, n;
long long ans1, ans2, x, y;
int main() {
  scanf("%d", &m);
  for (int i = 0; i < m; ++i) scanf("%d", A + i);
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", B + i);
  std::sort(A, A + m);
  std::sort(B, B + n);
  x = m * 3;
  y = n * 3;
  ans1 = -((unsigned long long)(-1) >> 5);
  ans2 = (unsigned long long)(-1) >> 5;
  for (int i = 0, j = 0; i < m; ++i) {
    if (i) --x;
    for (; j < n && B[j] < A[i]; ++j) --y;
    if (x - y > ans1 - ans2) ans1 = x, ans2 = y;
  }
  if (2 * m - 2 * n > ans1 - ans2) ans1 = m << 1, ans2 = n << 1;
  printf("%I64d:%I64d\n", ans1, ans2);
  return 0;
}
