#include <bits/stdc++.h>
using namespace std;
int N, M, S;
int h[100005], p[100005], val[100005];
int rk[100005], prob[100005];
int by[100005];
priority_queue<pair<int, int> > heap;
bool cmp(int x, int y) { return p[x] > p[y]; }
bool cmpp(int x, int y) { return h[x] > h[y]; }
bool Work(int mid) {
  int i, j = 1, tmp;
  int rest = S, now = 0, tp = 0;
  while (!heap.empty()) heap.pop();
  for (i = 1; i <= M; i++) {
    for (j; j <= N && p[rk[j]] >= h[prob[i]]; j++)
      heap.push(make_pair(-val[rk[j]], rk[j]));
    if (tp == 0) {
      if (heap.empty()) return false;
      tmp = heap.top().second;
      heap.pop();
      rest -= val[tmp];
      if (rest < 0) return false;
      tp = mid;
    }
    tp--, by[prob[i]] = tmp;
  }
  return true;
}
int main() {
  int i, j;
  scanf("%d %d %d", &N, &M, &S);
  for (i = 1; i <= M; i++) scanf("%d", &h[i]), prob[i] = i;
  for (i = 1; i <= N; i++) scanf("%d", &p[i]);
  for (i = 1; i <= N; i++) scanf("%d", &val[i]), rk[i] = i;
  sort(prob + 1, prob + 1 + M, cmpp);
  sort(rk + 1, rk + 1 + N, cmp);
  int lt = 1, rt = M, mid;
  while (lt <= rt) {
    mid = (lt + rt) / 2;
    if (Work(mid))
      rt = mid - 1;
    else
      lt = mid + 1;
  }
  if (lt == M + 1)
    printf("NO\n");
  else {
    printf("YES\n");
    Work(lt);
    for (i = 1; i <= M; i++) printf("%d ", by[i]);
    printf("\n");
  }
  return 0;
}
