#include <bits/stdc++.h>
using namespace std;
const int MN = 100111;
int nStudent, nBug, nPass, trace[MN];
struct Bug {
  int difficulty;
  int id, assigned;
} bugs[MN];
struct Student {
  int ability, pass, capacity;
  int id;
} students[MN];
bool operator<(const Bug& a, const Bug& b) {
  if (a.difficulty != b.difficulty) return a.difficulty < b.difficulty;
  return a.id < b.id;
}
bool operator<(const Student& a, const Student& b) {
  if (a.ability != b.ability) return a.ability < b.ability;
  return a.id < b.id;
}
bool check(int val) {
  for (int i = (1), _b = (nStudent); i <= _b; i++) students[i].capacity = val;
  set<pair<int, int> > s;
  int j = nStudent + 1;
  long long total = 0;
  for (int i = (nBug), _b = (1); i >= _b; i--) {
    while (j > 1 && students[j - 1].ability >= bugs[i].difficulty) {
      --j;
      s.insert(make_pair(students[j].pass, j));
    }
    if (s.empty()) return false;
    int cur = s.begin()->second;
    s.erase(s.begin());
    bugs[i].assigned = students[cur].id;
    if (students[cur].capacity == val) total += students[cur].pass;
    students[cur].capacity--;
    if (students[cur].capacity) {
      s.insert(make_pair(0, cur));
    }
  }
  return total <= nPass;
}
int main() {
  ios ::sync_with_stdio(false);
  cout << (fixed) << setprecision(9);
  while (cin >> nStudent >> nBug >> nPass) {
    for (int i = (1), _b = (nBug); i <= _b; i++) {
      cin >> bugs[i].difficulty;
      bugs[i].id = i;
    }
    for (int i = (1), _b = (nStudent); i <= _b; i++) cin >> students[i].ability;
    for (int i = (1), _b = (nStudent); i <= _b; i++) {
      cin >> students[i].pass;
      students[i].id = i;
    }
    sort(bugs + 1, bugs + nBug + 1);
    sort(students + 1, students + nStudent + 1);
    int l = 1, r = nBug + 1, res = r;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (check(mid)) {
        res = mid;
        r = mid - 1;
      } else
        l = mid + 1;
    }
    if (res > nBug)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      check(res);
      for (int i = (1), _b = (nBug); i <= _b; i++) {
        trace[bugs[i].id] = bugs[i].assigned;
      }
      for (int i = (1), _b = (nBug); i <= _b; i++) cout << trace[i] << ' ';
      cout << endl;
    }
  }
  return 0;
}
