#include <bits/stdc++.h>
using namespace std;
int a[201000], b[201000];
int n, m;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  a[n++] = 1e8;
  cin >> m;
  for (int i = 0; i < m; i++) cin >> b[i];
  sort(a, a + n);
  sort(b, b + m);
  int ansx, ansy, mx = -100000000;
  for (int i = 0; i < n; i++) {
    int dis = (int)((lower_bound(b, b + m, a[i])) - b);
    int x = (i * 2) + (n - 1 - i) * 3;
    int y = (dis * 2) + (m - dis) * 3;
    if (x - y >= mx) {
      if (x - y == mx && ansx > x) continue;
      mx = x - y;
      ansx = x;
      ansy = y;
    }
  }
  cout << ansx << ":" << ansy << endl;
  return 0;
}
