#include <bits/stdc++.h>
using namespace std;
long long get(vector<long long>& vec, long long val) {
  long long l = 0, h = vec.size() - 1;
  long long ans = -1;
  while (l <= h) {
    long long m = (l + h) / 2;
    if (vec[m] <= val) {
      ans = m;
      l = m + 1;
    } else
      h = m - 1;
  }
  return (ans + 1) * 2 + (vec.size() - ans - 1) * 3;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long na, nb;
  cin >> na;
  vector<long long> a(na), common;
  for (long long i = 0; i < na; i++) {
    cin >> a[i];
    common.push_back(a[i]);
  }
  sort((a).begin(), (a).end());
  cin >> nb;
  vector<long long> b(nb);
  for (long long i = 0; i < nb; i++) cin >> b[i];
  sort((b).begin(), (b).end());
  long long scorea = na * 3, scoreb = get(b, a[0] - 1);
  for (long long i = 0; i < na; i++) {
    long long teama = get(a, a[i] - 1);
    long long teamb = get(b, a[i] - 1);
    if ((scorea - scoreb) < (teama - teamb)) {
      scorea = teama;
      scoreb = teamb;
    }
  }
  long long teama = get(a, b[nb - 1]), teamb = nb * 2;
  if ((scorea - scoreb) < (teama - teamb)) {
    scorea = teama;
    scoreb = teamb;
  }
  cout << scorea << ":" << scoreb << "\n";
}
