#include <bits/stdc++.h>
void fre() {
  freopen("c://test//input.in", "r", stdin);
  freopen("c://test//output.out", "w", stdout);
}
template <class T>
inline void gmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline void gmin(T &a, T b) {
  if (b < a) a = b;
}
using namespace std;
const int N = 2e5 + 10, M = 0, Z = 1e9 + 7, maxint = 2147483647,
          ms31 = 522133279, ms63 = 1061109567, ms127 = 2139062143;
const double eps = 1e-8, PI = acos(-1.0);
int n, m;
int a[N], b[N];
int main() {
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    scanf("%d", &m);
    for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
    sort(a + 1, a + n + 1);
    a[n + 1] = 2.1e9;
    sort(b + 1, b + m + 1);
    b[m + 1] = 2.1e9;
    int ansdif = -2e9;
    int anssco0, anssco1;
    int p = 0;
    for (int i = 1; i <= n + 1; i++)
      if (a[i] > a[i - 1]) {
        int sco0 = (i - 1) * 2 + (n - (i - 1)) * 3;
        int t = a[i] - 1;
        while (p <= m && b[p + 1] <= t) p++;
        int sco1 = p * 2 + (m - p) * 3;
        int dif = sco0 - sco1;
        if (dif > ansdif) {
          ansdif = dif;
          anssco0 = sco0;
          anssco1 = sco1;
        } else if (dif == ansdif && sco0 > anssco0) {
          anssco0 = sco0;
          anssco1 = sco1;
        }
      }
    printf("%d:%d\n", anssco0, anssco1);
  }
  return 0;
}
