#include <bits/stdc++.h>
using namespace std;
std::pair<int, int> a[444444];
int main() {
  int x, y, mx, my, n, m;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = -1;
  }
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> a[i + n].first;
    a[i + n].second = 1;
  }
  std::sort(a, a + n + m);
  x = n * 3;
  y = m * 3;
  mx = x;
  my = y;
  for (int i = 0; i < n + m; i++) {
    if (a[i].second == 1)
      y--;
    else
      x--;
    if (x - y > mx - my) {
      mx = x;
      my = y;
    }
  }
  cout << mx << ":" << my << endl;
  return 0;
}
