#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int n, m, x, y, l, r, k, mx, mn;
pair<int, int> a[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < (int)(n); ++i) cin >> a[i].first, a[i].second = -1;
  cin >> m;
  for (int i = 0; i < (int)(m); ++i) cin >> a[i + n].first, a[i + n].second = 1;
  sort(a, a + n + m);
  x = n * 3, y = m * 3;
  mx = x, mn = y;
  for (int i = 0; i < (int)(n + m); ++i) {
    if (a[i].second == 1)
      y--;
    else
      x--;
    if (x - y > mx - mn) {
      mx = x;
      mn = y;
    }
  }
  printf("%d:%d", mx, mn);
  return 0;
}
