#include <bits/stdc++.h>
using namespace std;
ifstream fin("test.in");
ofstream fout("A.out");
int a[200010], b[200010];
int n, m, sola, solb;
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  cin >> m;
  for (int i = 1; i <= m; ++i) {
    cin >> b[i];
  }
  sort(a + 1, a + n + 1);
  sort(b + 1, b + m + 1);
  a[n + 1] = 2000000002;
  b[m + 1] = 2000000002;
  int ca = 3 * n;
  int cb = 3 * m;
  sola = 3 * n;
  solb = 3 * m;
  int i = 1;
  int j = 1;
  while (i <= n || j <= m) {
    int val = min(a[i], b[j]);
    while (j <= m && b[j] == val) {
      ++j;
      cb -= 1;
    }
    while (i <= n && a[i] == val) {
      ++i;
      ca -= 1;
    }
    if (ca - cb > sola - solb) {
      sola = ca;
      solb = cb;
    }
  }
  cout << sola << ":" << solb;
}
