#include <bits/stdc++.h>
using namespace std;
struct Student {
  int level, bugs, id;
};
bool cmp(const Student &a, const Student &b) { return a.level > b.level; }
int pass[200000];
int main() {
  int n, m, s;
  vector<Student> stud;
  vector<pair<int, int> > bugs;
  scanf("%d%d%d", &n, &m, &s);
  stud.resize(n);
  bugs.resize(m);
  for (int i = 0; i < (int)(m); ++i) {
    scanf("%d", &bugs[i].first);
    bugs[i].second = i;
  }
  for (int i = 0; i < (int)(n); ++i) scanf("%d", &stud[i].level);
  for (int i = 0; i < (int)(n); ++i) {
    stud[i].id = i;
    scanf("%d", &stud[i].bugs);
    pass[i] = stud[i].bugs;
  }
  sort(bugs.rbegin(), bugs.rend());
  sort(stud.begin(), stud.end(), cmp);
  int lo = 1, hi = m + 1, mid;
  vector<int> who(m, -1);
  while (lo < hi) {
    mid = (lo + hi) / 2;
    int ixb = 0, ixs = 0, cost = 0, current = -1;
    priority_queue<pair<int, int> > q;
    vector<int> days(n, 0);
    while (ixb < m && cost <= s) {
      while (ixs < n && stud[ixs].level >= bugs[ixb].first) {
        q.push(make_pair(-stud[ixs].bugs, stud[ixs].id));
        ++ixs;
      }
      if (current < 0 || days[current] >= mid) {
        while (!q.empty() && days[q.top().second] == mid) q.pop();
        if (q.empty()) break;
        current = q.top().second;
      }
      if (stud[ixs - 1].level < bugs[ixb].first) break;
      days[current]++;
      who[bugs[ixb].second] = current;
      if (days[current] == 1) cost += pass[current];
      ++ixb;
    }
    if (ixb >= m && cost <= s) {
      hi = mid;
    } else {
      lo = mid + 1;
    }
  }
  int ixb = 0, ixs = 0, cost = 0, current = -1;
  priority_queue<pair<int, int> > q;
  vector<int> days(n, 0);
  while (ixb < m && cost <= s) {
    while (ixs < n && stud[ixs].level >= bugs[ixb].first) {
      q.push(make_pair(-stud[ixs].bugs, stud[ixs].id));
      ++ixs;
    }
    if (current < 0 || days[current] >= lo) {
      while (!q.empty() && days[q.top().second] == lo) q.pop();
      if (q.empty()) break;
      current = q.top().second;
    }
    if (stud[ixs - 1].level < bugs[ixb].first) break;
    days[current]++;
    who[bugs[ixb].second] = current;
    if (days[current] == 1) cost += pass[current];
    ++ixb;
  }
  if (lo == m + 1)
    puts("NO");
  else {
    puts("YES");
    printf("%d", who[0] + 1);
    for (int i = (1); i < (int)(m); ++i) printf(" %d", who[i] + 1);
    puts("");
  }
  return 0;
}
