#include <bits/stdc++.h>
using namespace std;
const long long linf = 1e18 + 5;
const int mod = (int)1e9 + 7;
const int inf = 1e9;
long long read() {
  bool minus = false;
  long long result = 0;
  char ch;
  ch = getchar();
  while (true) {
    if (ch == '-') break;
    if (ch >= '0' && ch <= '9') break;
    ch = getchar();
  }
  if (ch == '-')
    minus = true;
  else
    result = ch - '0';
  while (true) {
    ch = getchar();
    if (ch < '0' || ch > '9') break;
    result = result * 10 + (ch - '0');
  }
  if (minus) {
    return -result;
  } else {
    return result;
  }
}
long long fpow(long long base, long long power) {
  long long result = 1;
  while (power > 0) {
    if (power % 2 == 1) result = (result * base);
    base = (base * base);
    power /= 2;
  }
  return result;
}
vector<int> a, b;
int main() {
  int n;
  cin >> n;
  for (__typeof(n) i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  int m;
  cin >> m;
  for (__typeof(m) i = 1; i <= m; ++i) {
    int x;
    cin >> x;
    b.push_back(x);
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  set<int> s;
  long long ans = -1e15, ansa = 0, ansb = 0;
  s.insert(0);
  for (auto it : a) s.insert(it);
  for (auto it : b) s.insert(it);
  for (auto it : s) {
    int index = upper_bound(a.begin(), a.end(), it) - a.begin();
    int suma = index * 2 + (n - index) * 3;
    index = upper_bound(b.begin(), b.end(), it) - b.begin();
    int sumb = index * 2 + (m - index) * 3;
    if (suma - sumb > ans) {
      ansa = suma;
      ansb = sumb;
      ans = suma - sumb;
    }
  }
  cout << ansa << ":" << ansb;
  return 0;
}
