#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int s[2] = {0};
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    s[0] += 3;
    v.push_back(make_pair(x, 0));
  }
  int m;
  cin >> m;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    s[1] += 3;
    v.push_back(make_pair(x, 1));
  }
  sort(v.begin(), v.end());
  pair<int, int> ans = make_pair(-1000000, 1000000);
  for (int i = 0; i < v.size(); i++) {
    if (!i) {
      if ((s[0] - s[1] > ans.first - ans.second) ||
          (s[0] - s[1] == ans.first - ans.second && s[0] > ans.first))
        ans = make_pair(s[0], s[1]);
    }
    s[v[i].second] -= 1;
    if (i == v.size() - 1 || (v[i + 1].first != v[i].first)) {
      if ((s[0] - s[1] > ans.first - ans.second) ||
          (s[0] - s[1] == ans.first - ans.second && s[0] > ans.first))
        ans = make_pair(s[0], s[1]);
    }
  }
  cout << ans.first << ":" << ans.second << endl;
}
