#include <bits/stdc++.h>
using namespace std;
const int FFF = 200005;
int a[FFF], b[FFF];
int qsearch(int x, int r) {
  int l = 1, mid;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (b[mid] < x)
      l = mid + 1;
    else
      r = mid - 1;
  }
  return r;
}
int main() {
  int n, m;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  sort(b + 1, b + m + 1);
  long long suma, sumb, cha;
  suma = n * 2;
  sumb = m * 2;
  cha = suma - sumb;
  for (int now = 0; now < n; now++) {
    int t = qsearch(a[now], m);
    long long tt1 = now * 2 + 3 * (n - now);
    long long tt2 = t * 2 + (m - t) * 3;
    long long tmp = tt1 - tt2;
    if (tmp > cha) {
      cha = tmp;
      suma = tt1;
      sumb = tt2;
    } else if (tmp == cha && suma < tt1) {
      suma = tt1;
      sumb = tt2;
    }
  }
  cout << suma << ':' << sumb << endl;
  return 0;
}
