#include <bits/stdc++.h>
using namespace std;
inline int max(int a, int b) { return a > b ? a : b; }
inline int min(int a, int b) { return a < b ? a : b; }
inline int gcd(int a, int b) {
  if (a % b)
    return gcd(b, a % b);
  else
    return b;
}
inline int lcm(int a, int b) { return (a * (b / gcd(a, b))); }
inline int And(int mask, int bit) { return mask & (1 << bit); }
inline int Or(int mask, int bit) { return mask | (1 << bit); }
inline int Xor(int mask, int bit) { return mask & (~(1 << bit)); }
int n, m;
int a[200100], b[200100];
pair<int, int> ans;
int findMaxPos(int key, int l, int r, int arr[]) {
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (key >= arr[mid])
      l = mid + 1;
    else
      r = mid - 1;
  }
  return r;
}
pair<int, int> solve(int d) {
  int posA, posB, xx, yy;
  posA = findMaxPos(d, 0, n - 1, a);
  xx = 2 * (posA + 1) + 3 * (n - posA - 1);
  posB = findMaxPos(d, 0, m - 1, b);
  if (posB >= 0)
    yy = 2 * (posB + 1) + 3 * (m - posB - 1);
  else
    yy = 3 * m;
  if (xx - yy > ans.first - ans.second)
    ans = pair<int, int>(xx, yy);
  else if (xx - yy == ans.first - ans.second && xx > ans.first)
    ans = pair<int, int>(xx, yy);
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  scanf("%d", &m);
  for (int i = 0; i < m; i++) scanf("%d", &b[i]);
  sort(b, b + m);
  ans = pair<int, int>(-1000000000, 1000000000);
  ans = solve(a[0] - 1);
  for (int i = 0; i < n; i++) ans = solve(a[i]);
  for (int i = 0; i < m; i++) ans = solve(b[i]);
  ans = solve(1000000000 - 1);
  printf("%d:%d\n", ans.first, ans.second);
  return 0;
}
