#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, reta, retb, scorea, scoreb, num, gap, posa, posb, m;
  vector<long long> a, b, tot;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> num;
    a.push_back(num);
    tot.push_back(num);
  }
  cin >> m;
  for (long long i = 0; i < m; i++) {
    cin >> num;
    b.push_back(num);
    tot.push_back(num);
  }
  sort((a).begin(), (a).end());
  sort((b).begin(), (b).end());
  sort((tot).begin(), (tot).end());
  tot.resize(unique((tot).begin(), (tot).end()) - tot.begin());
  gap = -999999999;
  reta = retb = 0;
  for (long long i = -1; i < tot.size(); i++) {
    int d;
    if (i == -1)
      d = tot[0] - 1;
    else
      d = tot[i];
    if (d < 0) continue;
    posa = upper_bound((a).begin(), (a).end(), d) - a.begin();
    scorea = (a.size() - posa) * 3 + posa * 2;
    posb = upper_bound((b).begin(), (b).end(), d) - b.begin();
    scoreb = (b.size() - posb) * 3 + posb * 2;
    if ((scorea - scoreb) > gap) {
      gap = scorea - scoreb;
      reta = scorea;
      retb = scoreb;
    } else if ((scorea - scoreb) == gap && scorea > reta) {
      reta = scorea;
      retb = scoreb;
    }
  }
  cout << reta << ":" << retb << endl;
  return 0;
}
