#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  const long long inf = numeric_limits<long long>::max();
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  a.push_back(inf);
  sort(a.begin(), a.end());
  int m;
  cin >> m;
  vector<long long> b(m);
  for (int i = 0; i < m; ++i) {
    cin >> b[i];
  }
  sort(b.begin(), b.end());
  long long ans1 = -inf, ans2 = 0, loc1, loc2;
  for (long long i = 0, j; i <= n; ++i) {
    loc1 = 2 * i + 3 * (n - i);
    j = upper_bound(b.begin(), b.end(), a[i] - 1) - b.begin();
    loc2 = 2 * j + 3 * (m - j);
    if (loc1 - loc2 > ans1 - ans2) {
      ans1 = loc1;
      ans2 = loc2;
    }
    if (loc1 - loc2 == ans1 - ans2 && loc1 > ans1) {
      ans1 = loc1;
      ans2 = loc2;
    }
  }
  cout << ans1 << ":" << ans2 << '\n';
  return 0;
}
