#include <bits/stdc++.h>
const int MOD = 100000007, INF = 0x7fffffff;
const double eps = 1e-12;
using namespace std;
inline int getint() {
  register int num = 0;
  register char ch;
  do {
    ch = getchar();
  } while (ch < '0' || ch > '9');
  do {
    num = num * 10 + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return num;
}
int main() {
  int da[200001];
  int db[200001];
  int n, m;
  while (~scanf("%d", &n)) {
    for (int i = 0; i < n; i++) {
      da[i] = getint();
    }
    scanf("%d", &m);
    for (int i = 0; i < m; i++) {
      db[i] = getint();
    }
    da[n] = 0x7FFFFFFF;
    sort(da, da + n);
    sort(db, db + m);
    int sa = n * 3, sb = m * 3;
    int ca = sa, cb = sb;
    for (int i = 0, j = 0; i <= n; i++, ca--) {
      while (j < m && db[j] < da[i]) {
        j++;
        cb--;
      }
      if (ca - cb > sa - sb) {
        sa = ca;
        sb = cb;
      }
    }
    printf("%d:%d\n", sa, sb);
  }
  return 0;
}
