2 10 1 1 1
1
10
1
1 5 1 8
 4 4 1 0 1
1

1
1 2 1 4
 2 5 1 0 1
2

1
1 4 1 5
 10 10 1 8 4
10
2 3 4 5 6 7 8 9
10
1 1 3 1
2 1 7 1
1 1 9 1
7 1 4 1
10 1 7 1
2 1 7 1
3 1 2 1
5 1 2 1
10 1 5 1
6 1 9 1
 2 4 1 1 1
1
4
1
1 2 1 3
 2 2 0 1 1

1
1
1 2 2 2
 1000 1000 1 1 10
1
2
1
1 900 1 1000
 5 5 1 1 1
3
2
1
1 5 1 1
 2 4 1 1 1
1
2
1
2 3 2 4
 4 4 1 0 1
4

5
1 1 2 2
1 3 2 2
3 3 4 3
3 2 2 2
1 2 2 3

3
 2
 1
 3
4
4
3
3
4
3
3
4
3
 1
 3
 100
 4
 1
 6
4
3
5
4

#include <bits/stdc++.h>
using namespace std;
int ls[100005];
int le[100005];
int inbetweenE(int x1, int x2, int ce) {
  int ans = -1;
  int l = 0, h = ce - 1;
  while (l <= h) {
    int mid = (l + h) / 2;
    if (le[mid] > x1 and le[mid] < x2) {
      return ans = le[mid];
    } else if (le[mid] < x1) {
      l = mid + 1;
    } else
      h = mid - 1;
  }
  return -1;
}
int inbetweenS(int x1, int x2, int cs) {
  int ans = -1;
  int l = 0, h = cs - 1;
  while (l <= h) {
    int mid = (l + h) / 2;
    if (ls[mid] > x1 and ls[mid] < x2) {
      return ans = ls[mid];
    } else if (ls[mid] < x1) {
      l = mid + 1;
    } else
      h = mid - 1;
  }
  return -1;
}
int closestE(int x1, int x2, int ce) {
  int l = 0;
  int h = ce - 1;
  int ans1 = -1;
  while (l <= h) {
    int mid = (l + h) / 2;
    if (le[mid] < x1) {
      ans1 = le[mid];
      l = mid + 1;
    } else {
      h = mid - 1;
    }
  }
  l = 0;
  h = ce - 1;
  int ans2 = -1;
  while (l <= h) {
    int mid = (l + h) / 2;
    if (le[mid] > x2) {
      ans2 = le[mid];
      h = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  if (ans1 == -1 and ans2 == -1)
    return -1;
  else if (ans1 == -1)
    return ans2;
  else if (ans2 == -1)
    return ans1;
  else {
    if ((x1 - ans1) < (ans2 - x2))
      return ans1;
    else
      return ans2;
  }
}
int closestS(int x1, int x2, int cs) {
  int l = 0;
  int h = cs - 1;
  int ans1 = -1;
  while (l <= h) {
    int mid = (l + h) / 2;
    if (ls[mid] < x1) {
      ans1 = ls[mid];
      l = mid + 1;
    } else {
      h = mid - 1;
    }
  }
  l = 0;
  h = cs - 1;
  int ans2 = -1;
  while (l <= h) {
    int mid = (l + h) / 2;
    if (ls[mid] > x2) {
      ans2 = ls[mid];
      h = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  if (ans1 == -1 and ans2 == -1)
    return -1;
  else if (ans1 == -1)
    return ans2;
  else if (ans2 == -1)
    return ans1;
  else {
    if ((x1 - ans1) < (ans2 - x2))
      return ans1;
    else
      return ans2;
  }
}
int main() {
  int n = ({
    int a;
    scanf("%d", &a);
    a;
  }),
      m = ({
        int a;
        scanf("%d", &a);
        a;
      }),
      cs = ({
        int a;
        scanf("%d", &a);
        a;
      }),
      ce = ({
        int a;
        scanf("%d", &a);
        a;
      }),
      v = ({
        int a;
        scanf("%d", &a);
        a;
      });
  for (int i = 0; i < cs; i++) {
    ls[i] = ({
      int a;
      scanf("%d", &a);
      a;
    });
  }
  for (int i = 0; i < ce; i++) {
    le[i] = ({
      int a;
      scanf("%d", &a);
      a;
    });
  }
  int q = ({
    int a;
    scanf("%d", &a);
    a;
  });
  while (q--) {
    int x1 = ({
      int a;
      scanf("%d", &a);
      a;
    }),
        y1 = ({
          int a;
          scanf("%d", &a);
          a;
        });
    int x2 = ({
      int a;
      scanf("%d", &a);
      a;
    }),
        y2 = ({
          int a;
          scanf("%d", &a);
          a;
        });
    if (x1 == x2) {
      printf("%d\n", abs(y1 - y2));
      continue;
    };
    int ydiff = abs(y1 - y2);
    int xdiff = abs(x1 - x2);
    int timeE = xdiff / v;
    if (xdiff % v != 0) timeE++;
    ;
    int timeS = xdiff;
    int lift = inbetweenE(min(y1, y2), max(y1, y2), ce);
    int anslf;
    if (lift != -1) {
      anslf = ydiff + timeE;
    } else {
      int liftc = closestE(min(y1, y2), max(y1, y2), ce);
      ;
      if (liftc != -1) {
        int xdiffag1 = abs(liftc - y1);
        int xdiffag2 = abs(liftc - y2);
        anslf = xdiffag2 + xdiffag1 + timeE;
        ;
      } else
        anslf = 3 * 100000000;
    }
    int stair = inbetweenS(min(y1, y2), max(y1, y2), cs);
    int ansst;
    if (stair != -1) {
      ansst = ydiff + timeS;
    } else {
      int stairc = closestS(min(y1, y2), max(y1, y2), cs);
      ;
      if (stairc != -1) {
        int xdiffag1 = abs(stairc - y1);
        int xdiffag2 = abs(stairc - y2);
        ansst = xdiffag2 + xdiffag1 + timeS;
        ;
      } else
        ansst = 3 * 100000000;
    }
    int ans = min(ansst, anslf);
    printf("%d\n", ans);
  }
  return 0;
}
