#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 5;
int n, m, s, a[N], b[N], c[N], ans[N];
vector<int> sorIdBug, sorIdStu;
bool check(int nDay) {
  int cost = 0;
  priority_queue<int, vector<int>, greater<int> > pq;
  for (auto iSorIdStu = sorIdStu.begin(), iSorIdBug = sorIdBug.begin();
       iSorIdBug != sorIdBug.end();) {
    while (iSorIdStu != sorIdStu.end() && b[*iSorIdStu] >= a[*iSorIdBug]) {
      pq.push(c[*iSorIdStu]);
      ++iSorIdStu;
    }
    if (pq.empty()) return false;
    cost = min(s + 5, cost + pq.top());
    pq.pop();
    int rem = nDay;
    while (iSorIdBug != sorIdBug.end() && rem) {
      --rem;
      ++iSorIdBug;
    }
  }
  return cost <= s;
}
void trace(int nDay) {
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      pq;
  for (auto iSorIdStu = sorIdStu.begin(), iSorIdBug = sorIdBug.begin();
       iSorIdBug != sorIdBug.end();) {
    while (iSorIdStu != sorIdStu.end() && b[*iSorIdStu] >= a[*iSorIdBug]) {
      pq.push({c[*iSorIdStu], *iSorIdStu});
      ++iSorIdStu;
    }
    int id = pq.top().second;
    pq.pop();
    int rem = nDay;
    while (iSorIdBug != sorIdBug.end() && rem) {
      ans[*iSorIdBug] = id;
      --rem;
      ++iSorIdBug;
    }
  }
}
int main() {
  scanf(" %d %d %d", &n, &m, &s);
  for (int i = 1; i <= m; ++i) scanf(" %d", a + i);
  for (int i = 1; i <= n; ++i) scanf(" %d", b + i);
  for (int i = 1; i <= n; ++i) scanf(" %d", c + i);
  sorIdBug.assign(m, 0);
  iota(sorIdBug.begin(), sorIdBug.end(), 1);
  sort(sorIdBug.begin(), sorIdBug.end(),
       [](int i, int j) { return a[i] > a[j]; });
  sorIdStu.assign(n, 0);
  iota(sorIdStu.begin(), sorIdStu.end(), 1);
  sort(sorIdStu.begin(), sorIdStu.end(),
       [](int i, int j) { return b[i] > b[j]; });
  int l = 0, r = N;
  while (l < r) {
    int mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  if (l == N) {
    printf("NO");
    return 0;
  }
  trace(l);
  printf("YES\n");
  for (int i = 1; i <= m; ++i) printf("%d ", ans[i]);
  return 0;
}
