#include <bits/stdc++.h>
using namespace std;
vector<int> proveri_vreme_etc(int n, int m, int s, int vreme,
                              vector<pair<int, int>> bagovi,
                              vector<pair<int, pair<int, int>>> studenti) {
  vector<int> r;
  vector<int> moze(m);
  priority_queue<pair<int, int>, vector<pair<int, int>>,
                 greater<pair<int, int>>>
      mogu_resiti;
  int treba_pass = 0;
  int i = n - 1;
  int j = m - 1;
  while (j >= 0) {
    int najt = bagovi[j].first;
    for (; i >= 0 && najt <= studenti[i].first; --i)
      mogu_resiti.push(
          make_pair(studenti[i].second.first, studenti[i].second.second));
    if (mogu_resiti.empty()) return r;
    moze[bagovi[j].second] = mogu_resiti.top().second;
    for (int k = 0; k < vreme && (j - k) >= 0; ++k) {
      moze[bagovi[j - k].second] = mogu_resiti.top().second;
    }
    j -= vreme;
    treba_pass += mogu_resiti.top().first;
    mogu_resiti.pop();
    if (treba_pass > s) return r;
  }
  return moze;
}
int main() {
  int n, m, s;
  scanf("%d%d%d", &n, &m, &s);
  vector<pair<int, int>> bagovi(m);
  vector<pair<int, pair<int, int>>> studenti(n);
  for (int i = 0; i < m; ++i) {
    scanf("%d", &bagovi[i].first);
    bagovi[i].second = i;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &studenti[i].first);
    studenti[i].second.second = i;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &studenti[i].second.first);
  }
  sort(begin(studenti), end(studenti));
  sort(begin(bagovi), end(bagovi));
  int l = 0;
  int r = m;
  while (l < r) {
    int mid = (l + r) / 2;
    if (!proveri_vreme_etc(n, m, s, mid, bagovi, studenti).empty())
      r = mid;
    else
      l = mid + 1;
  }
  vector<int> sol(m);
  sol = proveri_vreme_etc(n, m, s, r, bagovi, studenti);
  if (!sol.empty()) {
    printf("YES\n");
    for (int i = 0; i < m; ++i) printf("%d ", sol[i] + 1);
    return 0;
  }
  printf("NO\n");
  return 0;
}
