#include <bits/stdc++.h>
using namespace std;
int n, m;
pair<long long, bool> dat[5555555];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    long long c;
    cin >> c;
    dat[i] = make_pair(c, 0);
  }
  cin >> m;
  for (int i = 1; i <= m; ++i) {
    long long x;
    cin >> x;
    dat[i + n] = make_pair(x, 1);
  }
  sort(dat + 1, dat + 1 + n + m);
  int x1 = n * 3, x2 = m * 3, delta = x1 - x2;
  int ans = delta;
  int ansx = x1, ansy = x2;
  for (int i = 1; i <= n + m; ++i) {
    if (dat[i].second == 0) {
      x1--;
    } else
      x2--;
    while (i < n + m && dat[i].first == dat[i + 1].first) {
      i++;
      dat[i].second ? x2-- : x1--;
    }
    if (x1 - x2 > ans) {
      ans = x1 - x2;
      ansx = x1;
      ansy = x2;
    }
  }
  cout << ansx << ':' << ansy << endl;
  return 0;
}
