#include <bits/stdc++.h>
using namespace std;
int n[2], a[2][200001];
long long res[2];
int BFind(int i, int x) {
  int l = 0, r = n[i], m;
  while (l < r) {
    m = (l + r) / 2;
    if (a[i][m] > x)
      r = m;
    else
      l = m + 1;
  }
  return l;
}
int main() {
  ios::sync_with_stdio(0);
  for (int i = (0), _b = (2); i < _b; i++) {
    cin >> n[i];
    for (int j = (0), _b = (n[i]); j < _b; j++) cin >> a[i][j];
    sort(a[i], a[i] + n[i]);
    res[i] = (long long)n[i] * 3;
  }
  int x, pos;
  long long point[2];
  for (int i = (0), _b = (2); i < _b; i++) {
    for (int j = (0), _b = (n[i]); j < _b; j++) {
      x = a[i][j];
      for (int k = (0), _b = (2); k < _b; k++) {
        pos = BFind(k, x);
        point[k] = (long long)n[k] * 3 - pos;
      }
      if (point[0] - point[1] > res[0] - res[1] ||
          (point[0] - point[1] == res[0] - res[1] && point[0] > res[0])) {
        res[0] = point[0];
        res[1] = point[1];
      }
    }
  }
  cout << res[0] << ":" << res[1];
  return 0;
}
