#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, a[200005], b[200005];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  cin >> m;
  for (int i = 0; i < m; i++) cin >> b[i];
  sort(a, a + n);
  sort(b, b + m);
  int x = 0, y = 0;
  int ans;
  int aa = (x * 2 + (n - x) * 3), bb = (y * 2 + (m - y) * 3);
  int max = aa - bb;
  for (int i = 0; i < m + n; i++) {
    if (a[x] == b[y]) {
      x++;
      while (a[x - 1] == a[x] && x != n) x++;
      y++;
      while (b[y - 1] == b[y] && y != m) y++;
    } else if (a[x] < b[y]) {
      x++;
      while (a[x - 1] == a[x] && x != n) x++;
    } else {
      y++;
      while (b[y - 1] == b[y] && y != m) y++;
    }
    ans = (x * 2 + (n - x) * 3) - (y * 2 + (m - y) * 3);
    if (ans > max) {
      max = ans;
      aa = (x * 2 + (n - x) * 3);
      bb = (y * 2 + (m - y) * 3);
    }
    if (x == n || y == m) break;
    i = x + y;
  }
  ans = n * 2 - m * 2;
  if (ans > max) {
    max = ans;
    aa = n * 2;
    bb = m * 2;
  }
  printf("%d:%d", aa, bb);
  return 0;
}
