#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, n1, n2;
  vector<pair<int, int> > v;
  cin >> n1;
  for (int i = 0; i < n1; i++) {
    int x;
    cin >> x;
    v.push_back({x, 0});
  }
  cin >> n2;
  for (int i = 0; i < n2; i++) {
    int x;
    cin >> x;
    v.push_back({x, 1});
  }
  n = n1 + n2;
  sort(v.begin(), v.end());
  int a = n1 * 3, b = n2 * 3, a1 = a, b1 = b;
  for (int i = 0; i < n; i++) {
    if (v[i].second == 0)
      a1--;
    else
      b1--;
    if (a - b < a1 - b1 || (a - b == a1 - b1 && a < a1)) {
      a = a1;
      b = b1;
    }
  }
  cout << a << ":" << b << endl;
  return 0;
}
