#include <bits/stdc++.h>
using namespace std;
int n, m, S;
pair<int, int> bug[100000];
pair<pair<int, int>, int> student[100000];
int ans[100000], temp[100000];
int main(void) {
  scanf("%d %d %d", &n, &m, &S);
  for (int i = 0; i < m; i++) {
    scanf("%d", &bug[i].first);
    bug[i].second = i;
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &student[i].first.first);
    student[i].second = i;
  }
  for (int i = 0; i < n; i++) scanf("%d", &student[i].first.second);
  sort(bug, bug + m);
  sort(student, student + n);
  ans[0] = -1;
  int s = 1, e = m + 1;
  while (s < e) {
    int mid = (s + e) / 2;
    priority_queue<pair<int, int>, vector<pair<int, int> >,
                   greater<pair<int, int> > >
        q;
    int works = m / s;
    int bi = m - 1;
    int si = n - 1;
    long long costSum = 0;
    bool isFound = true;
    while (bi >= 0) {
      while (si >= 0 && student[si].first.first >= bug[bi].first) {
        q.push(make_pair(student[si].first.second, student[si].second));
        si--;
      }
      if (q.size() == 0) {
        isFound = false;
        break;
      }
      costSum += q.top().first;
      int ind = q.top().second;
      q.pop();
      for (int i = 0; i < mid && bi - i >= 0; i++)
        temp[bug[bi - i].second] = ind + 1;
      bi -= mid;
    }
    if (costSum > S) isFound = false;
    if (isFound) {
      for (int i = 0; i < m; i++) ans[i] = temp[i];
      e = mid;
    } else
      s = mid + 1;
  }
  if (ans[0] == -1)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 0; i < m; i++) printf("%d ", ans[i]);
  }
  return 0;
}
