#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 10;
const long long maxmax = 1000000LL * 100000LL;
long long n, m, tmp, i, j, a[N], b[N], tt[N], go[N][2], l, r, res;
int main() {
  cin >> n >> m >> tmp >> tmp;
  for (i = 0; i < n; i++) cin >> a[i];
  for (j = 1; j <= m; j++) cin >> b[j];
  b[0] = -maxmax;
  b[m + 1] = maxmax;
  m += 2;
  for (i = 0; i < n; i++) {
    l = 0;
    r = m;
    while (l < r)
      if (b[(l + r) / 2] <= a[i])
        l = (l + r) / 2 + 1;
      else
        r = (l + r) / 2;
    l--;
    if ((a[i] - b[l]) < (b[r] - a[i])) {
      go[i][0] = l;
      go[i][1] = maxmax;
    };
    if ((a[i] - b[l]) > (b[r] - a[i])) {
      go[i][1] = r;
      go[i][0] = maxmax;
    };
    if ((a[i] - b[l]) == (b[r] - a[i])) {
      go[i][1] = r;
      go[i][0] = l;
    };
  }
  for (j = 0; j <= m; j++) tt[j] = maxmax;
  for (i = 0; i < n; i++) {
    if (go[i][1] == maxmax) {
      j = go[i][0];
      if (tt[j] == maxmax || tt[j] == (a[i] - b[j])) res++;
      tt[j] = min(tt[j], a[i] - b[j]);
      continue;
    }
    if (go[i][0] == maxmax) {
      j = go[i][1];
      if (tt[j] == maxmax || tt[j] == (b[j] - a[i])) res++;
      tt[j] = min(tt[j], b[j] - a[i]);
      continue;
    }
    if (tt[go[i][0]] == maxmax || tt[j] == (a[i] - b[j])) {
      j = go[i][0];
      if (tt[j] == maxmax || tt[j] == (a[i] - b[j])) res++;
      tt[j] = min(tt[j], a[i] - b[j]);
      continue;
    } else {
      j = go[i][1];
      if (tt[j] == maxmax || tt[j] == (b[j] - a[i])) res++;
      tt[j] = min(tt[j], b[j] - a[i]);
      continue;
    }
  }
  cout << n - res << endl;
}
