#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0)->sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto &x : a) cin >> x;
  int m;
  cin >> m;
  vector<int> b(m);
  for (auto &x : b) cin >> x;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  int x = 0, y = 0;
  for (int i = 0; i < n; ++i) {
    auto it = lower_bound(b.begin(), b.end(), a[i]);
    int cnt = b.end() - it;
    if ((n - i - cnt > x - y) || (n - i - cnt >= x - y && (n - i > x))) {
      y = cnt;
      x = n - i;
    }
  }
  cout << (int64_t)n * 2 + x << ':' << (int64_t)m * 2 + y;
}
