#include <bits/stdc++.h>
using namespace std;
int main() {
  long long d = 0;
  long long bas = 0;
  long long bbs = 0;
  long long as = 0;
  long long bs = 0;
  long long a;
  cin >> a;
  vector<int> ap;
  for (int i = 0; i < a; i++) {
    int temp;
    cin >> temp;
    as += 3;
    ap.push_back(temp);
  }
  long long b;
  cin >> b;
  vector<int> bp;
  for (int i = 0; i < b; i++) {
    int temp;
    cin >> temp;
    bs += 3;
    bp.push_back(temp);
  }
  sort(ap.begin(), ap.end());
  sort(bp.begin(), bp.end());
  bas = as;
  bbs = bs;
  int ai = 0;
  for (int i = 0; i < b;) {
    d = bp[i];
    while (i < b && bp[i] <= d) {
      bs--;
      i++;
    }
    while (ai < a && ap[ai] <= d) {
      as--;
      ai++;
    }
    if (bas - bbs < as - bs) {
      bas = as;
      bbs = bs;
      continue;
    }
    if (bas < as) {
      bas = as;
      bbs = bs;
      continue;
    }
  }
  cout << bas << ":" << bbs;
}
