#include <bits/stdc++.h>
using namespace std;
int a[200050];
int b[200050];
int c[400050];
int main() {
  int n, m, cont;
  scanf("%d", &n);
  cont = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    c[cont++] = a[i];
  }
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &b[i]);
    c[cont++] = b[i];
  }
  sort(a, a + n);
  sort(b, b + m);
  c[cont++] = 0;
  c[cont++] = 2000000050;
  int maxn = -0x3f3f3f3f;
  int ansa = -1;
  int ansb = -1;
  for (int i = 0; i < cont; i++) {
    int sanfen = c[i];
    int l = 0;
    int r = n;
    int posa = -1;
    while (r >= l) {
      int mid = (l + r) / 2;
      if (a[mid] >= sanfen) {
        posa = mid;
        r = mid - 1;
      } else
        l = mid + 1;
    }
    l = 0;
    r = m;
    int posb = -1;
    while (r >= l) {
      int mid = (l + r) / 2;
      if (b[mid] >= sanfen) {
        posb = mid;
        r = mid - 1;
      } else
        l = mid + 1;
    }
    int defena, defenb;
    if (posa == -1)
      defena = n * 2;
    else
      defena = (n - posa) * 3 + posa * 2;
    if (posb == -1)
      defenb = m * 2;
    else
      defenb = (m - posb) * 3 + posb * 2;
    if (defena - defenb > maxn) {
      maxn = defena - defenb;
      ansa = defena;
      ansb = defenb;
    } else if (defena - defenb == maxn) {
      if (defena > ansa) {
        ansa = defena;
        ansb = defenb;
      }
    }
  }
  printf("%d:%d\n", ansa, ansb);
}
