#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> num;
vector<int> vA, vB;
int ansA, ansB;
void Init() {
  vA.clear();
  vB.clear();
  num.clear();
}
void solve() {
  ansA = 3 * n;
  ansB = 3 * m;
  sort(vA.begin(), vA.end());
  sort(vB.begin(), vB.end());
  sort(num.begin(), num.end());
  int sumA = ansA, sumB = ansB;
  int id0 = 0, id1 = 0;
  for (int i = 0; i < num.size(); ++i) {
    while (id0 < vA.size() && vA[id0] <= num[i]) {
      --sumA;
      ++id0;
    }
    while (id1 < vB.size() && vB[id1] <= num[i]) {
      --sumB;
      ++id1;
    }
    if (sumA - sumB > ansA - ansB) {
      ansA = sumA;
      ansB = sumB;
    }
  }
  printf("%d:%d\n", ansA, ansB);
}
int main() {
  while (scanf("%d", &n) != EOF) {
    Init();
    int tmp;
    for (int i = 0; i < n; ++i) {
      scanf("%d", &tmp);
      vA.push_back(tmp);
      num.push_back(tmp);
    }
    scanf("%d", &m);
    for (int i = 0; i < m; ++i) {
      scanf("%d", &tmp);
      vB.push_back(tmp);
      num.push_back(tmp);
    }
    solve();
  }
  return 0;
}
