#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  cin >> m;
  long long b[m];
  for (int i = 0; i < m; ++i) {
    cin >> b[i];
  }
  vector<pair<long long, long long> > p;
  p.push_back(make_pair(3 * n, 3 * m));
  p.push_back(make_pair(2 * n, 2 * m));
  sort(a, a + n), sort(b, b + m);
  for (int i = 0; i < n; ++i) {
    long long x = 0, y = 0;
    x = (upper_bound(a, a + n, a[i]) - a);
    long long c = (x * 2) + ((n - x) * 3);
    y = (upper_bound(b, b + m, a[i]) - b);
    long long z = (y * 2) + ((m - y) * 3);
    p.push_back(make_pair(c, z));
    x = 0, y = 0;
    x = (upper_bound(a, a + n, a[i] - 1) - a);
    c = (x * 2) + ((n - x) * 3);
    y = (upper_bound(b, b + m, a[i] - 1) - b);
    z = (y * 2) + ((m - y) * 3);
    p.push_back(make_pair(c, z));
  }
  n = p.size();
  long long mx = -1e18, ansa, ansb;
  for (int i = 0; i < n; ++i) {
    if (p[i].first - p[i].second > mx) {
      mx = p[i].first - p[i].second;
      ansa = p[i].first, ansb = p[i].second;
    } else if (p[i].first - p[i].second == mx && p[i].first > ansa) {
      ansa = p[i].first, ansb = p[i].second;
    }
  }
  cout << ansa << ":" << ansb;
  return 0;
}
