#include <bits/stdc++.h>
using namespace std;
int n, m, Y0, Y1;
long long dist_diff(int x1, int x2) {
  return ((Y1 - Y0) * 1LL * (Y1 - Y0) + (x1 - x2) * 1LL * (x1 - x2));
}
int M[100000], S[100000];
bool S_COV[100000];
long long COV_D[100000];
int cl[100000][2];
bool HAS_L[100000], HAS_R[100000];
int main() {
  int i, j, k, l;
  scanf("%d%d%d%d", &n, &m, &Y0, &Y1);
  for (i = 0; i < n; ++i) scanf("%d", &M[i]);
  for (i = 0; i < m; ++i) scanf("%d", &S[i]);
  l = 0;
  for (i = 0; i < n; ++i) {
    cl[i][0] = cl[i][1] = -1;
    while ((l + 1) < m && abs(M[i] - S[l]) > abs(M[i] - S[l + 1])) ++l;
    cl[i][0] = l;
    if (l + 1 < m && abs(M[i] - S[l]) == abs(M[i] - S[l + 1])) cl[i][1] = l + 1;
  }
  int COV = 0;
  for (i = 0; i < n; ++i) {
    if (cl[i][0] == -1) continue;
    char T = 'L';
    if (cl[i][1] != -1)
      if (S_COV[cl[i][0]] && COV_D[cl[i][0]] != dist_diff(M[i], S[cl[i][0]]))
        if (!S_COV[cl[i][1]] || COV_D[cl[i][1]] == dist_diff(M[i], S[cl[i][1]]))
          T = 'R';
    int tar = cl[i][0];
    if (T == 'R') tar = cl[i][1];
    if (!S_COV[tar]) {
      S_COV[tar] = true;
      COV_D[tar] = dist_diff(M[i], S[tar]);
      ++COV;
    } else {
      if (COV_D[tar] == dist_diff(M[i], S[tar])) ++COV;
      COV_D[tar] = min(COV_D[tar], dist_diff(M[i], S[tar]));
    }
  }
  printf("%d\n", n - COV);
  return 0;
}
