#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
const long long INF = 0x7fffffff;
long long a[maxn], b[maxn], k[maxn << 1];
int cnt;
void Init(int& n, long long c[]) {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%I64d", c + i);
    k[cnt++] = c[i];
  }
  sort(c, c + n);
}
int main() {
  int n, m;
  Init(n, a);
  Init(m, b);
  sort(k, k + cnt);
  long long ans_1, ans_2;
  for (int i = 0; i < cnt; ++i) {
    for (int j = -1; j <= 1; ++j) {
      long long d = k[i] + j;
      int loc_1 = upper_bound(a, a + n, d) - a;
      int loc_2 = upper_bound(b, b + m, d) - b;
      long long sum_1 = (n - loc_1) * 3 + loc_1 * 2;
      long long sum_2 = (m - loc_2) * 3 + loc_2 * 2;
      if (i == 0 && j == -1) {
        ans_1 = sum_1;
        ans_2 = sum_2;
      } else {
        if (ans_1 - ans_2 < sum_1 - sum_2) {
          ans_1 = sum_1;
          ans_2 = sum_2;
        } else if ((ans_1 - ans_2 == sum_1 - sum_2) && sum_1 > ans_1) {
          ans_1 = sum_1;
          ans_2 = sum_2;
        }
      }
    }
  }
  printf("%I64d:%I64d\n", ans_1, ans_2);
  return 0;
}
