#include <bits/stdc++.h>
using namespace std;
long long f[200000 + 60], s[200000 + 60];
int main() {
  int n, m;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &f[i]);
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) scanf("%lld", &s[i]);
  sort(f + 1, f + n + 1);
  sort(s + 1, s + m + 1);
  long long li = -0x7FFFFFFF, ri = 0x7FFFFFFF;
  long long vala, valb;
  f[n + 1] = 0x7FFFFFFF;
  for (int i = 0; i <= n; i++) {
    while (i < n && f[i + 1] == f[i]) i++;
    vala = 2 * i + (n - i) * 3;
    int tt = upper_bound(s + 1, s + m + 1, f[i + 1] - 1) - s;
    tt--;
    valb = 2 * tt + (m - tt) * 3;
    if (vala - valb > li - ri)
      li = vala, ri = valb;
    else if (vala - valb == li - ri)
      if (vala > li) li = vala, ri = valb;
  }
  cout << li << ":" << ri << endl;
  return 0;
}
