#include <bits/stdc++.h>
using namespace std;
int N, M, S;
int A[(100005)];
int B[(100005)];
int C[(100005)];
pair<int, int> AA[(100005)];
pair<int, int> BB[(100005)];
set<pair<int, int> > stu;
int res[(100005)];
int sola[(100005)];
int main() {
  int i, j;
  scanf("%d %d %d", &N, &M, &S);
  for (i = 0; i < M; ++i) scanf("%d", A + i);
  for (i = 0; i < N; ++i) scanf("%d", B + i);
  for (i = 0; i < N; ++i) scanf("%d", C + i);
  int maxa = 0;
  int maxb = 0;
  for (i = 0; i < M; ++i) maxa = max(maxa, A[i]);
  for (i = 0; i < N; ++i)
    if (C[i] <= S) maxb = max(maxb, B[i]);
  if (maxa > maxb) {
    printf("NO\n");
    return 0;
  }
  for (i = 0; i < M; ++i) AA[i] = pair<int, int>(A[i], i);
  sort(AA, AA + M);
  for (i = 0; i < N; ++i) BB[i] = pair<int, int>(B[i], i);
  sort(BB, BB + N);
  int l = 1;
  int r = M;
  while (l <= r) {
    int m = (l + r) / 2;
    int okay = 0;
    stu.clear();
    j = N;
    long long sum = 0;
    for (i = M - 1; i >= 0 && sum <= S;) {
      while (j > 0 && BB[j - 1].first >= AA[i].first) {
        --j;
        int b = BB[j].second;
        stu.insert(pair<int, int>(C[b], b));
      }
      if (stu.empty()) break;
      set<pair<int, int> >::iterator si = stu.begin();
      pair<int, int> p = *si;
      stu.erase(si);
      sum += p.first;
      int ii;
      for (ii = i; ii >= 0 && ii > i - m; --ii) {
        res[AA[ii].second] = p.second;
      }
      i = ii;
    }
    if (sum <= S && i < 0) okay = 1;
    if (okay) {
      r = m - 1;
      memcpy(sola, res, sizeof(sola));
    } else
      l = m + 1;
  }
  printf("YES\n");
  for (i = 0; i < M; ++i) {
    if (i) putchar(' ');
    printf("%d", sola[i] + 1);
  }
  putchar('\n');
  return 0;
}
