#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int main() {
  int n, m;
  while (~scanf("%d", &n)) {
    int x;
    for (int i = 0; i < n; i++) {
      scanf("%d", &x);
      v.push_back(make_pair(x, 0));
    }
    scanf("%d", &m);
    for (int i = 0; i < m; i++) {
      scanf("%d", &x);
      v.push_back(make_pair(x, 1));
    }
    sort(v.begin(), v.end());
    int n1 = 3 * n, n2 = 3 * m, x1 = n1, x2 = n2;
    for (int i = 0; i < n + m; i++) {
      if (v[i].second)
        x2--;
      else
        x1--;
      if ((x1 - x2) > (n1 - n2)) n1 = x1, n2 = x2;
    }
    printf("%d:%d\n", n1, n2);
  }
}
