#include <bits/stdc++.h>
using namespace std;
int n, m, mx = int(2e9), k, a[222222], ans1, ans2, b[222222], c[444444];
vector<int> v;
int main() {
  mx *= -1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    v.push_back(a[i]);
  }
  cin >> m;
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
    v.push_back(b[i]);
  }
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + m);
  sort(v.begin(), v.end());
  c[++k] = 0;
  c[++k] = v[0];
  for (int i = 1; i < v.size(); i++)
    if (v[i - 1] != v[i]) c[++k] = v[i];
  c[++k] = v[v.size() - 1] + 1;
  for (int i = 1; i <= k; i++) {
    int ind1 = upper_bound(a + 1, a + 1 + n, c[i]) - a;
    int ind2 = upper_bound(b + 1, b + 1 + m, c[i]) - b;
    long long sum1 = (n - ind1 + 1) * 3 + (ind1 - 1) * 2;
    long long sum2 = (m - ind2 + 1) * 3 + (ind2 - 1) * 2;
    if (sum1 - sum2 > mx) {
      mx = sum1 - sum2;
      ans1 = sum1;
      ans2 = sum2;
    } else if (sum1 - sum2 == mx) {
      if (sum1 > ans1) {
        ans1 = sum1;
        ans2 = sum2;
      }
    }
  }
  cout << endl;
  cout << ans1 << ':' << ans2;
  return 0;
}
