#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
ostream &operator<<(ostream &out, const pair<A, B> &a) {
  return out << "(" << a.first << "," << a.second << ")";
}
template <class A>
ostream &operator<<(ostream &out, const vector<A> &a) {
  for (const A &it : a) out << it << " ";
  return out;
}
template <class A, class B>
istream &operator>>(istream &in, pair<A, B> &a) {
  return in >> a.first >> a.second;
}
template <class A>
istream &operator>>(istream &in, vector<A> &a) {
  for (A &i : a) in >> i;
  return in;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  cin >> a;
  long long m;
  cin >> m;
  vector<long long> b(m);
  cin >> b;
  sort((a).begin(), (a).end());
  sort((b).begin(), (b).end());
  vector<long long> v;
  for (long long i : a) {
    v.push_back(i + 1);
    if (i - 1 >= 0) v.push_back(i - 1);
    v.push_back(i);
  }
  for (long long i : b) {
    v.push_back(i + 1);
    if (i - 1 >= 0) v.push_back(i - 1);
    v.push_back(i);
  }
  long long ans = -(1e18), x, y;
  vector<pair<long long, long long> > ass;
  for (long long d : v) {
    long long as1 = (a.end() - upper_bound((a).begin(), (a).end(), d));
    long long as2 = (b.end() - upper_bound((b).begin(), (b).end(), d));
    long long tx = as1 * 3 + (n - as1) * 2;
    long long ty = as2 * 3 + (m - as2) * 2;
    if (tx - ty >= ans) {
      ans = tx - ty;
      x = tx;
      y = ty;
      ass.push_back({-ans, -x});
    }
  }
  sort((ass).begin(), (ass).end());
  x = -ass[0].second;
  y = ass[0].first + x;
  cout << x << ":" << y;
}
