#include <bits/stdc++.h>
const int maxn = 2e5 + 5;
using namespace std;
long long n, m;
long long a[maxn], b[maxn], mx = -1e6;
long long ans1, ans2, ans;
int main() {
  scanf("%lld", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  a[n + 1] = 1e10;
  scanf("%lld", &m);
  for (int i = 1; i <= m; i++) scanf("%lld", &b[i]);
  sort(a + 1, a + n + 1);
  sort(b + 1, b + m + 1);
  int now1, now2;
  int cnt = 1;
  for (int i = 1; i <= n + 1; i++) {
    while (b[cnt] < a[i] && cnt <= m) cnt++;
    now1 = n * 3 - i + 1;
    now2 = m * 3 - cnt + 1;
    if (now1 - now2 > mx) {
      ans1 = now1;
      ans2 = now2;
      mx = ans1 - ans2;
    }
  }
  printf("%lld:%lld\n", ans1, ans2);
  return 0;
}
