#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N |= (1LL << pos); }
int Reset(int N, int pos) { return N &= ~(1LL << pos); }
bool Check(int N, int pos) { return N & (1LL << pos); }
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1}, dy[] = {1, -1, 0, 0, 1, -1, -1, 1};
inline void cn(long &n) {
  n = 0;
  long ch = getchar();
  int sign = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') sign = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    n = (n << 3) + (n << 1) + ch - '0', ch = getchar();
  n = n * sign;
}
template <class T>
void cmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
void cmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
int len(const T &c) {
  return (int)c.size();
}
template <class T>
int len(char c[]) {
  return (int)strlen(c);
}
string itos(long n) {
  string s;
  while (n) {
    s += (n % 10 + 48);
    n /= 10;
  }
  reverse(s.begin(), s.end());
  return s;
}
long stoi(string s) {
  long n = 0;
  for (int i(0), _n(len(s)); i < _n; ++i) n = n * 10 + (s[i] - 48);
  return n;
}
long long n, ar[200005], arr[200005], m, a, p, b, aa, bb, mx = 0;
pair<int, int> fun(long d) {
  p = upper_bound(ar, ar + n, d) - ar;
  a = (p * 2 + (n - p) * 3);
  p = upper_bound(arr, arr + m, d) - arr;
  b = (p * 2 + (m - p) * 3);
  return make_pair(a, b);
}
int main() {
  mx = -100000000000000000LL;
  cin >> n;
  for (int i(0), _n(n); i < _n; ++i) cin >> ar[i];
  cin >> m;
  for (int i(0), _n(m); i < _n; ++i) cin >> arr[i];
  sort(ar, ar + n);
  sort(arr, arr + m);
  aa = n * 3;
  bb = m * 3;
  mx = aa - bb;
  pair<int, int> pr;
  pr = fun(ar[0] - 1);
  a = pr.first;
  b = pr.second;
  if (a - b > mx) {
    mx = a - b;
    aa = a;
    bb = b;
  } else if (a - b == mx && a > aa) {
    aa = a;
    bb = b;
  }
  for (int i(0), _n(n); i < _n; ++i) {
    pr = fun(ar[i]);
    a = pr.first;
    b = pr.second;
    if (a - b > mx) {
      mx = a - b;
      aa = a;
      bb = b;
    } else if (a - b == mx && a > aa) {
      aa = a;
      bb = b;
    }
  }
  for (int i(0), _n(m); i < _n; ++i) {
    pr = fun(arr[i]);
    a = pr.first;
    b = pr.second;
    if (a - b > mx) {
      mx = a - b;
      aa = a;
      bb = b;
    } else if (a - b == mx && a > aa) {
      aa = a;
      bb = b;
    }
  }
  pr = fun(ar[n - 1] + 1);
  a = pr.first;
  b = pr.second;
  if (a - b > mx) {
    mx = a - b;
    aa = a;
    bb = b;
  } else if (a - b == mx && a > aa) {
    aa = a;
    bb = b;
  }
  cout << aa << ":" << bb;
  return 0;
}
