#include <bits/stdc++.h>
using namespace std;
int n, m;
long long vi1[250000];
long long vi2[250000];
int main() {
  int i, j, k;
  cin >> n;
  for (i = 0; i < (n); ++i) {
    long long tmp;
    cin >> tmp;
    vi1[i] = tmp;
  }
  cin >> m;
  for (i = 0; i < (m); ++i) {
    long long tmp;
    cin >> tmp;
    vi2[i] = -tmp;
  }
  sort(vi1, vi1 + n);
  sort(vi2, vi2 + m);
  long long r1 = n * 2, r2 = m * 2;
  long long tp1, tp2;
  for (i = 0; i < (n); ++i) {
    tp1 = (n - i) * 3 + i * 2;
    int pos = upper_bound(vi2, vi2 + m, -vi1[i]) - vi2;
    tp2 = pos * 3 + (m - pos) * 2;
    if (tp1 - tp2 > r1 - r2) {
      r1 = tp1;
      r2 = tp2;
    } else if (tp1 - tp2 == r1 - r2 && r1 < tp1) {
      r1 = tp1;
      r2 = tp2;
    }
  }
  cout << r1 << ":" << r2 << endl;
  return 0;
}
