#include <bits/stdc++.h>
using namespace std;
struct student {
  int id;
  int lvl;
  int cost;
  student() {}
  student(int a, int b, int c) : id(a), lvl(b), cost(c) {}
};
bool operator<(student a, student b) {
  if (a.cost != b.cost) return a.cost > b.cost;
  return a.lvl > b.lvl;
}
bool cmp3(student a, student b) {
  if (a.lvl != b.lvl) return a.lvl > b.lvl;
  return a.cost < b.cost;
}
struct bug {
  int id;
  int dif;
  int ans;
  bug() {}
  bug(int a, int b, int c) : id(a), dif(b), ans(c) {}
};
bool cmp1(bug a, bug b) { return a.dif > b.dif; }
bool cmp2(bug a, bug b) { return a.id < b.id; }
int main() {
  int n, m, s, lo, hi, mid, pos;
  long long sum, limit;
  bool posible, ok;
  vector<int> partial;
  vector<bug> bugs;
  priority_queue<student> pq;
  vector<student> students;
  while (scanf("%d %d %d\n", &n, &m, &s) != EOF) {
    limit = s;
    bugs.clear();
    bugs.resize(m);
    for (int i = 0; i < m; i++) {
      scanf("%d", &bugs[i].dif);
      bugs[i].id = i;
    }
    sort(bugs.begin(), bugs.end(), cmp1);
    students.clear();
    students.resize(n);
    for (int i = 0; i < n; i++) students[i].id = i + 1;
    for (int i = 0; i < n; i++) scanf("%d", &students[i].lvl);
    for (int i = 0; i < n; i++) scanf("%d", &students[i].cost);
    sort(students.begin(), students.end(), cmp3);
    partial.clear();
    partial.resize(m);
    ok = false;
    lo = 0;
    hi = m;
    while (lo <= hi) {
      mid = (lo + hi) * 0.5;
      while (!pq.empty()) pq.pop();
      posible = true;
      pos = 0;
      sum = 0LL;
      for (int i = 0; i < m; i++) {
        while (pos < n && students[pos].lvl >= bugs[i].dif) {
          pq.push(students[pos]);
          pos++;
        }
        if (pq.empty())
          posible = false;
        else {
          student chosen = pq.top();
          pq.pop();
          sum += chosen.cost;
          for (int j = 0; j < mid && i + j < m; j++) partial[i + j] = chosen.id;
          i += mid - 1;
        }
      }
      if (posible && sum <= limit) {
        hi = mid - 1;
        ok = true;
        for (int i = 0; i < m; i++) bugs[i].ans = partial[i];
      } else
        lo = mid + 1;
    }
    printf("%s\n", ok ? "YES" : "NO");
    if (ok) {
      sort(bugs.begin(), bugs.end(), cmp2);
      for (int i = 0; i < m; i++)
        if (i == 0)
          printf("%d", bugs[i].ans);
        else
          printf(" %d", bugs[i].ans);
      printf("\n");
    }
  }
  return 0;
}
