#include <bits/stdc++.h>
using namespace std;
int a[200005];
int b[200005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
  }
  int m;
  scanf("%d", &m);
  for (int i = 0; i < m; ++i) {
    scanf("%d", b + i);
  }
  sort(a, a + n);
  sort(b, b + m);
  int sum_a = 3 * n, sum_b = 3 * m;
  int ans_a = 3 * n, ans_b = 3 * m;
  int i = 0, j = 0;
  while (i < n || j < m) {
    int cur_d = 0;
    if (j >= m) {
      cur_d = a[i];
    } else if (i >= n) {
      cur_d = b[j];
    } else {
      cur_d = min(a[i], b[j]);
    }
    while (i < n && a[i] <= cur_d) {
      sum_a -= 1;
      ++i;
    }
    while (j < m && b[j] <= cur_d) {
      sum_b -= 1;
      ++j;
    }
    if (sum_a - sum_b > ans_a - ans_b) {
      ans_a = sum_a;
      ans_b = sum_b;
    }
  }
  printf("%d:%d\n", ans_a, ans_b);
  return 0;
}
