#include <bits/stdc++.h>
using namespace std;
long long int ax[200010];
long long int bx[200010];
long long int n, m, mx = -10000000000000;
long long int _tani(long long int d) {
  long long int i, l, r, p = -1, k, x, b;
  l = 1;
  r = m;
  while (l <= r) {
    x = (l + r) / 2;
    if (bx[x] > d) {
      r = x - 1;
    } else if (bx[x] <= d) {
      l = x + 1;
      p = x;
    }
  }
  if (p == -1)
    return m * 3;
  else {
    b = p * 2 + (m - p) * 3;
    return b;
  }
}
int main() {
  long long int i, j, c, d, x, p, k, y, a, b, l, r;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> ax[i];
  cin >> m;
  for (i = 1; i <= m; i++) cin >> bx[i];
  sort(ax + 1, ax + n + 1);
  sort(bx + 1, bx + m + 1);
  ax[0] = 1;
  ax[n + 1] = 10000000000000;
  for (i = 0; i <= n + 1; i++) {
    p = ax[i] - 1;
    a = (i - 1) * 2;
    a += ((n - (i - 1)) * 3);
    if (p == 0) a = n * 3;
    b = _tani(p);
    d = a - b;
    if (d > mx) {
      mx = d;
      x = a;
      y = b;
    } else if (d == mx) {
      if (a > x) {
        x = a;
        y = b;
      }
    }
  }
  cout << x << ":" << y << endl;
  return 0;
}
