#include <bits/stdc++.h>
const int mod = 1e9 + 7;
const int MAX = 2e5 + 7;
using namespace std;
long long n, m, d;
pair<long long, long long> arr[2 * MAX];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  int k = 0;
  for (long long i = 0; i < n; i++) {
    cin >> d;
    arr[k].first = d;
    arr[k].second = 1;
    k++;
  }
  cin >> m;
  for (long long i = 0; i < m; i++) {
    cin >> d;
    arr[k].first = d;
    arr[k].second = 2;
    k++;
  }
  sort(arr, arr + k);
  long long curra = 3LL * n, currb = 3LL * m;
  long long resa = 3LL * n, resb = 3LL * m;
  long long x = 0, y = 0;
  for (int i = 0; i < k; i++) {
    if (arr[i].second == 1)
      x++;
    else
      y++;
    if (resa - resb < (curra - x) - (currb - y)) {
      resa = curra - x;
      resb = currb - y;
    }
  }
  cout << resa << ":" << resb;
}
