#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  vector<int> d1, d2, d;
  cin >> n;
  for (int(i) = 0; (i) < (int)(n); ++(i)) {
    int x;
    cin >> x;
    d1.push_back(x);
    d.push_back(x);
  }
  cin >> n;
  for (int(i) = 0; (i) < (int)(n); ++(i)) {
    int x;
    cin >> x;
    d2.push_back(x);
    d.push_back(x);
  }
  sort((d1).begin(), (d1).end()), sort((d2).begin(), (d2).end());
  vector<int> dd;
  for (auto x : d) {
    if (x - 1 >= 0) dd.push_back(x - 1);
    dd.push_back(x + 1);
  }
  d.insert(d.end(), (dd).begin(), (dd).end());
  sort((d).begin(), (d).end()),
      d.erase(unique((d).begin(), (d).end()), d.end());
  int res = -(int)1e9, a, b;
  for (auto x : d) {
    int t = d1.end() - upper_bound((d1).begin(), (d1).end(), x);
    int c1 = t * 3 + ((int)(d1).size() - t) * 2;
    t = d2.end() - upper_bound((d2).begin(), (d2).end(), x);
    int c2 = t * 3 + ((int)(d2).size() - t) * 2;
    if (c1 - c2 > res) res = c1 - c2, a = c1, b = c2;
  }
  printf("%d:%d\n", a, b);
  return 0;
}
