#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int& x : a) {
    cin >> x;
  }
  sort(a.begin(), a.end());
  int m;
  cin >> m;
  vector<int> b(m);
  for (int& y : b) {
    cin >> y;
  }
  sort(b.begin(), b.end());
  int sa = 2 * n, sb = 2 * m;
  int sa_best = sa, sb_best = sb;
  for (int i = n - 1, j = m - 1; i >= 0; --i) {
    int d = a[i] - 1;
    ++sa;
    while (j >= 0 && b[j] > d) {
      ++sb;
      --j;
    }
    if ((sa - sb) >= (sa_best - sb_best)) {
      sa_best = sa, sb_best = sb;
    }
  }
  cout << sa_best << ':' << sb_best << endl;
}
int main() {
  {
    ios::sync_with_stdio(false), cin.tie(nullptr),
        cout << fixed << setprecision(10);
  }
  solve();
  return 0;
}
