#include <bits/stdc++.h>
using namespace std;
long long nn[200050], mm[200050];
int main() {
  long long n, m, Max = -1000000000000000000;
  long long mn, mx, f = 0, X, Y, d;
  scanf("%I64d", &n);
  for (long long i = 0; i <= n - 1; i++) scanf("%I64d", &nn[i]);
  sort(nn, nn + n);
  scanf("%I64d", &m);
  for (long long i = 0; i <= m - 1; i++) scanf("%I64d", &mm[i]);
  sort(mm, mm + m);
  for (long long i = 0; i <= n - 1; i++) {
    X = (n - i) * 3 + i * 2;
    d = nn[i] - 1;
    if (d >= mm[f] && f != m)
      while (d >= mm[f])
        if (f == m - 1) {
          f++;
          break;
        } else
          f++;
    Y = f * 2 + (m - f) * 3;
    if (Max < X - Y) {
      Max = X - Y;
      mx = X;
      mn = Y;
    }
    if (i + 1 != n)
      while (nn[i] == nn[i + 1])
        if (i + 2 == n) {
          i++;
          break;
        } else
          i++;
  }
  X = n * 2;
  Y = m * 2;
  if (X - Y > Max) {
    Max = X - Y;
    mx = X;
    mn = Y;
  }
  printf("%lld:%lld\n", mx, mn);
  return (0);
}
