#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, n, m, x, u, v, k, U2, V;
  vector<long long> a, b;
  vector<long long>::iterator pos;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
  cin >> m;
  for (i = 0; i < m; i++) {
    cin >> x;
    b.push_back(x);
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  u = n * 3;
  v = m * 3;
  U2 = u;
  V = v;
  for (i = b.size() - 1; i >= 0; i--) {
    pos = upper_bound(a.begin(), a.end(), b[i]);
    if (pos != a.end()) {
      k = pos - a.begin();
      u = k * 2 + (n - k) * 3;
    } else
      u = n * 2;
    v = (i + 1) * 2 + (m - i - 1) * 3;
    if (u - v > U2 - V || (u - v == U2 - V && u > U2)) {
      U2 = u;
      V = v;
    }
  }
  u = n * 2;
  v = m * 2;
  if (u - v > U2 - V || (u - v == U2 - V && u > U2)) {
    U2 = u;
    V = v;
  }
  cout << U2 << ":" << V << "\n";
  return 0;
}
