#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> va(n);
  for (int i = 0; i < n; ++i) cin >> va[i];
  int m;
  cin >> m;
  vector<int> vb(m);
  for (int i = 0; i < m; ++i) cin >> vb[i];
  sort(va.begin(), va.end());
  sort(vb.begin(), vb.end());
  int best = INT_MIN;
  int sela, selb;
  for (int i = 0; i <= n; ++i) {
    int a = 2 * i + 3 * (n - i);
    int j = i < n ? lower_bound(vb.begin(), vb.end(), va[i]) - vb.begin() : m;
    int b = 2 * j + 3 * (m - j);
    if (a - b > best) {
      best = a - b;
      sela = a;
      selb = b;
    }
  }
  cout << sela << ":" << selb << endl;
}
