#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000LL * 1000 * 1000 + 7;
class DSU {
 private:
  vector<int> ids;
  vector<int> h;

 public:
  DSU(int n) {
    ids.resize(n);
    h.resize(n);
    for (int i = 0; i < n; i++) {
      ids[i] = i;
      h[i] = 1;
    }
  }
  int getRoot(int ind) {
    if (ids[ind] != ind) return getRoot(ids[ind]);
    return ind;
  }
  bool connected(int ind1, int ind2) { return getRoot(ind1) == getRoot(ind2); }
  void connect(int ind1, int ind2) {
    if (connected(ind1, ind2)) return;
    int r1 = getRoot(ind1);
    int r2 = getRoot(ind2);
    if (h[r1] > h[r2]) {
      ids[r2] = r1;
      h[r1] += h[r2];
    } else {
      ids[r1] = r2;
      h[r2] += h[r1];
    }
  }
  void showId(int n) {
    for (int i = 0; i < n; i++) {
      printf("%d ", ids[i]);
    }
    printf("\n");
  }
};
long long gcd(long long a, long long b) {
  while (b != 0) {
    long long t = a % b;
    a = b;
    b = t;
  }
  return a;
}
long long lcd(long long a, long long b) { return a / gcd(a, b) * b; }
const int INF = 1e8;
int sgn(int n) {
  if (n < 0) return -1;
  if (n > 0) return 1;
  return 0;
}
int bS(int trg, vector<int> &arr) {
  int l = 0;
  int r = (int)arr.size();
  while (r - l > 1) {
    int h = l + r >> 1;
    if (arr[h] > trg)
      r = h;
    else
      l = h;
  }
  return l;
}
int main() {
  int n1, n2;
  scanf("%d", &n1);
  vector<int> arr1(n1);
  for (int i = 0; i < n1; scanf("%d", &arr1[i++]))
    ;
  scanf("%d", &n2);
  vector<int> arr2(n2);
  for (int i = 0; i < n2; scanf("%d", &arr2[i++]))
    ;
  sort(arr1.begin(), arr1.end());
  sort(arr2.begin(), arr2.end());
  int l = 0;
  int r = 2000000001;
  int lastR;
  int delta = INT_MIN;
  int a = -1;
  int b = -1;
  while (r) {
    int h = r + l >> 1;
    int j1 = bS(h, arr1);
    int j2 = bS(h, arr2);
    int resA, resB;
    if (arr1[j1] > h) {
      resA = 3 * n1;
    } else {
      resA = 2 * (j1 + 1) + 3 * (n1 - 1 - j1);
    }
    if (arr2[j2] > h) {
      resB = 3 * n2;
    } else {
      resB = 2 * (j2 + 1) + 3 * (n2 - 1 - j2);
    }
    int resDelta = resA - resB;
    if (resDelta > delta) {
      lastR = r;
      r = h;
      delta = resDelta;
      a = resA;
      b = resB;
    } else if (resDelta == delta) {
      lastR = r;
      r = h;
      if (a < resA) {
        a = resA;
        b = resB;
      }
    } else
      break;
  }
  for (int i = 0; i <= lastR; i++) {
    int j1 = bS(i, arr1);
    int j2 = bS(i, arr2);
    int resA, resB;
    if (arr1[j1] > i) {
      resA = 3 * n1;
    } else {
      resA = 2 * (j1 + 1) + 3 * (n1 - 1 - j1);
    }
    if (arr2[j2] > i) {
      resB = 3 * n2;
    } else {
      resB = 2 * (j2 + 1) + 3 * (n2 - 1 - j2);
    }
    int resDelta = resA - resB;
    if (resDelta > delta) {
      delta = resDelta;
      a = resA;
      b = resB;
    } else if (resDelta == delta) {
      if (a < resA) {
        a = resA;
        b = resB;
      }
    }
  }
  printf("%d:%d", a, b);
  return 0;
}
