#include <bits/stdc++.h>
using namespace std;
int a[200005];
int b[200005];
int n, m;
int score[2];
void solve();
bool if_win(int);
int main() {
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  score[0] = 0;
  score[1] = 0xffffff;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  scanf("%d", &m);
  for (int i = 0; i < m; i++) scanf("%d", &b[i]);
  sort(a, a + n);
  sort(b, b + m);
  solve();
  return 0;
}
void solve() {
  for (int i = 0; i < n; i++) if_win(i);
  a[0] = 0;
  if_win(0);
  a[0] = 0xffffff;
  if_win(0);
  printf("%d:%d\n", score[0], score[1]);
}
bool if_win(int x) {
  int y = a[x] - 1;
  long long s1, s2;
  s1 = s2 = 0;
  if (x == 0 && a[x] == 0)
    s1 = n * 3;
  else if (x == 0 && a[x] == 0xffffff)
    s1 = n * 2;
  else
    s1 = x * 2 + (n - x) * 3;
  if (b[0] > y)
    s2 = m * 3;
  else if (b[m - 1] <= y)
    s2 = m * 2;
  else {
    double lb = 0, ub = 2 * (m - 1);
    for (int i = 0; i < 100; i++) {
      int mid = (int)((lb + ub) / 2);
      if (b[mid] <= y && b[mid + 1] > y) {
        s2 += (mid + 1) * 2;
        s2 += (m - 1 - mid) * 3;
        break;
      } else {
        if (b[mid] <= y)
          lb = mid;
        else
          ub = mid;
      }
      if (lb == ub) break;
    }
  }
  if (s1 - s2 > score[0] - score[1]) {
    score[0] = s1;
    score[1] = s2;
  } else if (s1 - s2 == score[0] - score[1]) {
    if (s1 > score[0]) {
      score[0] = s1;
      score[1] = s2;
    }
  }
  return true;
}
