#include <bits/stdc++.h>
using namespace std;
int na, nb;
int a[200005], b[200005];
void input() {
  int i;
  scanf("%d", &na);
  for (i = 0; i < na; i++) scanf("%d", &a[i]);
  scanf("%d", &nb);
  for (i = 0; i < nb; i++) scanf("%d", &b[i]);
}
void solve() {
  int i, j;
  int x, y;
  int tx, ty;
  sort(a, a + na);
  sort(b, b + nb);
  x = 2 * na;
  tx = x;
  y = 2 * nb;
  ty = y;
  for (i = na - 1, j = nb - 1; i >= 0; i--) {
    tx++;
    while (j >= 0 && a[i] <= b[j]) {
      ty++;
      j--;
    }
    if (tx - ty >= x - y) {
      x = tx;
      y = ty;
    }
  }
  printf("%d:%d\n", x, y);
}
int main() {
  input();
  solve();
  return 0;
}
