#include <bits/stdc++.h>
using namespace std;
template <typename T>
T prod(const T &a, const T &b, const T &mod) {
  return ((a % mod) * (b % mod)) % mod;
}
template <typename T>
T pow_(const T &a, const T &b) {
  if (!b) return 1;
  T p = pow_(a, b / 2);
  p *= p;
  return (b % 2) ? (p * a) : p;
}
template <typename T>
T modpow(const T &a, const T &b, const T &mod) {
  if (!b) return 1;
  T p = modpow(a, b / 2);
  p = prod(p, p);
  return (b % 2) ? (prod(p, a)) : p;
}
template <typename T>
T max(const T &a, const T &b, const T &c) {
  return max(a, max(b, c));
}
template <typename T>
T min(const T &a, const T &b, const T &c) {
  return min(a, min(b, c));
}
template <typename T>
void dbg(const vector<T> &a, int l, int r) {
  for (long long int i = l; i <= r; i++) cout << a[i] << " ";
  cout << endl;
}
template <typename T>
void dbg(const vector<T> &a) {
  for (long long int i = 0; i <= a.size() - 1; i++) cout << a[i] << " ";
  cout << endl;
}
long long int search(long long int num, vector<long long int> &a) {
  long long int l = 0, r = a.size() - 1;
  while (l < r) {
    long long int mid = (l + r + 1) / 2;
    if (a[mid] <= num)
      l = mid;
    else
      r = mid - 1;
  }
  return l;
}
vector<long long int> a, b;
void check(long long int num, long long int &ansa, long long int &ansb) {
  long long int cnta = search(num, a) + 1;
  long long int cntb = search(num, b) + 1;
  if (a[0] > num) cnta = 0;
  if (b[0] > num) cntb = 0;
  long long int reta = cnta * 2 + (a.size() - cnta) * 3;
  long long int retb = cntb * 2 + (b.size() - cntb) * 3;
  if (ansa - ansb < reta - retb) {
    ansa = reta;
    ansb = retb;
  } else if (ansa - ansb == reta - retb) {
    if (ansa < reta) {
      ansa = reta;
      ansb = retb;
    }
  }
  if (ansa == -1) {
    ansa = reta;
    ansb = retb;
  }
}
void main_() {
  long long int n, m;
  scanf("%lld", &n);
  a.resize(n);
  for (long long int i = 0; i <= n - 1; i++) scanf("%lld", &a[i]);
  scanf("%lld", &m);
  b.resize(m);
  for (long long int i = 0; i <= m - 1; i++) scanf("%lld", &b[i]);
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  long long int ansa = -1, ansb = -1;
  for (long long int i = 0; i <= n - 1; i++) {
    check(a[i] - 1, ansa, ansb);
    check(a[i], ansa, ansb);
    check(a[i] + 1, ansa, ansb);
  }
  for (long long int i = 0; i <= m - 1; i++) {
    check(b[i] - 1, ansa, ansb);
    check(b[i], ansa, ansb);
    check(b[i] + 1, ansa, ansb);
  }
  cout << ansa << ":" << ansb << endl;
}
int main() {
  { main_(); }
  return 0;
}
