#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int main() {
  long long int a = 0, b = 0, i, x, y, sum = INT_MIN, temp, check = 0,
                less = INT_MAX;
  vector<long long int> av, bv;
  map<long long int, bool> mp, foo;
  cin >> x;
  for (i = 0; i < x; i++) {
    cin >> temp;
    av.push_back(temp);
    mp[temp] = true;
  }
  cin >> x;
  for (i = 0; i < x; i++) {
    cin >> temp;
    bv.push_back(temp);
    mp[temp] = true;
  }
  sort(av.begin(), av.end());
  sort(bv.begin(), bv.end());
  for (auto z : mp) {
    for (int p = 0; p < 3; p++) {
      temp = z.first - 1 + p;
      if (!foo[temp]) {
        x = upper_bound(av.begin(), av.end(), temp) - av.begin();
        y = upper_bound(bv.begin(), bv.end(), temp) - bv.begin();
        x = (x * 2 + (av.size() - x) * 3);
        y = (y * 2 + (bv.size() - y) * 3);
        if (x >= y) {
          if (x - y > sum) {
            sum = x - y;
            a = x;
            b = y;
          }
          if (x - y == sum && x > a) {
            a = x;
            b = y;
          }
          check = 1;
        }
        if (!check) {
          if (y - x < less) {
            less = y - x;
            a = x;
            b = y;
          }
          if (y - x == less && x > a) {
            a = x;
            b = y;
          }
        }
        foo[temp] = true;
      }
    }
  }
  cout << a << ":" << b;
}
