#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 1e3 + 2;
const long long int mod = 1e3 + 2;
vector<pair<long long int, long long int> > a;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, x;
  cin >> n;
  for (long long int i = 0; i < n; i++) {
    cin >> x;
    a.push_back({x, 1});
  }
  cin >> m;
  for (long long int i = 0; i < m; i++) {
    cin >> x;
    a.push_back({x, 2});
  }
  sort(a.begin(), a.end());
  long long int s1 = (3 * n), s2 = (3 * m);
  long long int ans = (s1 - s2);
  long long int ascore = s1, bscore = s2;
  for (long long int i = 0; i < a.size(); i++) {
    if (a[i].second == 1)
      s1--;
    else
      s2--;
    if ((s1 - s2) > ans) {
      ans = (s1 - s2);
      ascore = s1;
      bscore = s2;
    }
  }
  cout << ascore << ":" << bscore << endl;
  return 0;
}
