#include <bits/stdc++.h>
using namespace std;
long score(vector<int>& A, int d) {
  long na3 = A.end() - lower_bound(A.begin(), A.end(), d);
  return 3 * na3 + 2 * (A.size() - na3);
}
long finddiff(vector<int>& A, vector<int>& B, int d) {
  return score(A, d) - score(B, d);
}
int main() {
  int m, n;
  cin >> m;
  vector<int> A(m);
  for (int i = 0; i < m; i++) cin >> A[i];
  cin >> n;
  vector<int> B(n);
  for (int i = 0; i < n; i++) cin >> B[i];
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  long maxdiff = INT_MIN, maxd = 0;
  for (int i = 0; i < A.size(); i++) {
    long diff = finddiff(A, B, A[i]);
    if (diff > maxdiff) {
      maxdiff = diff;
      maxd = A[i];
    }
  }
  for (int i = 0; i < B.size(); i++) {
    long diff = finddiff(A, B, B[i]);
    if (diff > maxdiff) {
      maxdiff = diff;
      maxd = B[i];
    }
  }
  long diff = finddiff(A, B, max(A[m - 1], B[n - 1]) + 1);
  if (diff > maxdiff) {
    maxdiff = diff;
    maxd = max(A[m - 1], B[n - 1]) + 1;
  }
  cout << score(A, maxd) << ":" << score(B, maxd);
  return 0;
}
