#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)2e5 + 5;
int n, m, aa[maxn], bb[maxn];
int sa, sb, ans, a1, a2;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &aa[i]);
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) scanf("%d", &bb[i]);
  sort(aa + 1, aa + 1 + n);
  sort(bb + 1, bb + 1 + m);
  ans = -100 * maxn;
  for (int i = n; i > 0; i--) {
    int pos = upper_bound(bb + 1, bb + m + 1, aa[i] - 1) - bb;
    pos--;
    sa = (n + 1 - i) * 3 + (i - 1) * 2;
    sb = (m - pos) * 3 + pos * 2;
    if (sa - sb >= ans) {
      ans = sa - sb;
      a1 = sa;
      a2 = sb;
    }
  }
  if (n * 2 - m * 2 > ans) {
    ans = n * 2 - m * 2;
    a1 = n * 2;
    a2 = m * 2;
  }
  printf("%d:%d\n", a1, a2);
}
