#include <bits/stdc++.h>
using namespace std;
vector<long long> a, b;
long long x;
int main() {
  int n, m;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
  sort(a.begin(), a.end());
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> x;
    b.push_back(x);
  }
  sort(b.begin(), b.end());
  long long ans1 = -1, ans2 = -1, temp = -1e9;
  long long index = 1e6 + 6;
  for (int i = 0; i < index; i++) {
    int temp1 = upper_bound(a.begin(), a.end(), i) - a.begin();
    int temp2 = upper_bound(b.begin(), b.end(), i) - b.begin();
    long long tans1 = 2 * temp1 + 3 * (n - temp1);
    long long tans2 = 2 * temp2 + 3 * (m - temp2);
    if (tans1 - tans2 >= temp) {
      if (tans1 - tans2 > temp) {
        temp = tans1 - tans2;
        ans1 = tans1;
        ans2 = tans2;
      } else if (tans1 - tans2 == temp && tans1 > ans1) {
        ans1 = tans1;
        ans2 = tans2;
      }
    }
  }
  cout << ans1 << ":" << ans2 << endl;
  return 0;
}
