#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2e5 + 10;
int a[N], b[N], vals[2 * N], n, m, k;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    vals[k++] = a[i];
  }
  cin >> m;
  for (int i = 0; i < m; ++i) {
    cin >> b[i];
    vals[k++] = b[i];
  }
  sort(a, a + n);
  sort(b, b + m);
  pair<int, int> ans{3 * n, 3 * m};
  for (int i = 0; i < k; ++i) {
    int apos = upper_bound(a, a + n, vals[i]) - a;
    int bpos = upper_bound(b, b + m, vals[i]) - b;
    int sa = apos * 2 + (n - apos) * 3;
    int sb = bpos * 2 + (m - bpos) * 3;
    int curScore = ans.first - ans.second;
    int newScore = sa - sb;
    if (curScore == newScore)
      ans = max(ans, make_pair(sa, sb));
    else if (curScore < newScore)
      ans = make_pair(sa, sb);
  }
  cout << ans.first << ":" << ans.second << '\n';
  return 0;
}
