#include <bits/stdc++.h>
using namespace std;
void print(vector<int> v) {
  size_t sz = v.size();
  for (int i : v) {
    cout << i << " ";
  }
}
vector<int> a, b, c;
int main(void) {
  int n, m;
  scanf("%d", &n);
  a.resize(n);
  int x;
  for (unsigned i = 0; i < n; i++) {
    scanf("%d", &x);
    a[i] = x;
    c.push_back(x);
  }
  scanf("%d", &m);
  b.resize(m);
  for (unsigned i = 0; i < m; i++) {
    scanf("%d", &x);
    b[i] = x;
    c.push_back(x);
  }
  int a1 = 0, a2 = 0;
  int ans = INT_MIN;
  int co = m + n;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  sort(c.begin(), c.end());
  c.push_back(c[co - 1] + 1);
  co++;
  int i = 0;
  for (i = 0; i < co; i++) {
    int p1, p2 = 0;
    int val = c[i] - 1;
    int l = 0, h = n - 1, mid;
    while (l <= h) {
      mid = (l + h) / 2;
      if (a[mid] <= val)
        l = mid + 1;
      else
        h = mid - 1;
    }
    p1 = 3 * (n - l) + 2 * l;
    l = 0;
    h = m - 1;
    while (l <= h) {
      mid = (l + h) / 2;
      if (b[mid] <= val)
        l = mid + 1;
      else
        h = mid - 1;
    }
    p2 = 3 * (m - l) + 2 * l;
    if ((p1 - p2) > ans) {
      ans = p1 - p2;
      a1 = p1;
      a2 = p2;
    } else if ((p1 - p2) == ans) {
      if (p1 > a1) {
        a1 = p1;
        a2 = p2;
      }
    }
  }
  printf("%d:%d", a1, a2);
}
