#include <bits/stdc++.h>
using namespace std;
struct Student {
  int i, h, c;
};
const bool operator<(const Student &A, const Student &B) {
  if (A.c == B.c) {
    return A.i < B.i;
  }
  return A.c < B.c;
}
bool byH(const Student &A, const Student &B) { return A.h > B.h; }
int n, m, s;
pair<int, int> B[100001];
int H[100001];
int C[100001];
Student S[100001];
bool feasible(int k) {
  if (k < 1) {
    return false;
  }
  memset(H, -1, sizeof(int) * n);
  int rem = s;
  int j = 0;
  set<Student> available;
  for (int i = m - 1; i >= 0; i -= k) {
    while ((j < n) && (S[j].h >= B[i].first)) {
      available.insert(S[j]);
      ++j;
    }
    set<Student>::iterator sel = available.begin();
    if (sel == available.end()) {
      return false;
    }
    if (sel->c > rem) {
      return false;
    }
    rem -= sel->c;
    int lim = (((-1) > (i - k)) ? (-1) : (i - k));
    for (int ii = i; ii > lim; --ii) {
      H[B[ii].second] = sel->i;
    }
    available.erase(sel);
  }
  return true;
}
int main(int argc, char *argv[]) {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 0; i < m; ++i) {
    B[i].second = i;
    scanf("%d", &B[i].first);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &H[i]);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &C[i]);
    S[i].h = H[i];
    S[i].c = C[i];
    S[i].i = i + 1;
  }
  sort(B, B + m);
  sort(S, S + n, byH);
  int a = 0, b = m + 1;
  while (b - a > 1) {
    int mid = (a + b) / 2;
    if (feasible(mid)) {
      b = mid;
    } else {
      a = mid;
    }
  }
  if (b > m) {
    printf("NO\n");
    return 0;
  }
  feasible(b);
  printf("YES\n");
  for (int i = 0; i < m; ++i) {
    printf("%d ", H[i]);
  }
  printf("\n");
  return 0;
}
