#include <bits/stdc++.h>
using namespace std;
int main() {
  pair<long long, int> p[400005];
  int n, m;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = 1;
  }
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> p[i + n].first;
    p[i + n].second = 2;
  }
  int x = n * 3;
  int y = m * 3;
  sort(p, p + n + m);
  int u = x, v = y;
  for (int i = 0; i < n + m; i++) {
    if (p[i].second == 1)
      x--;
    else
      y--;
    if (x - y > u - v) {
      u = x;
      v = y;
    }
  }
  cout << u << ":" << v << endl;
}
