#include <bits/stdc++.h>
using namespace std;
int nb, ns, money;
bool used[100010];
struct student {
  int id, b, c;
  bool operator>(const student &temp) const { return c > temp.c; }
} stu[100010];
struct BUG {
  int id, a, s;
} bug[100010];
priority_queue<student, vector<student>, greater<student> > pqueue;
bool cmp_bug_a(BUG x, BUG y) { return x.a < y.a; }
bool cmp_bug_id(BUG x, BUG y) { return x.id < y.id; }
bool cmp_stu_b(student x, student y) { return x.b < y.b; }
bool work(int day) {
  int index = ns;
  int mm = money;
  vector<student> ans;
  ans.clear();
  while (!pqueue.empty()) pqueue.pop();
  for (int ith = nb; ith >= 1; ith -= day) {
    int tar = bug[ith].a;
    while (index && stu[index].b >= tar) {
      pqueue.push(stu[index]);
      index--;
    }
    if (pqueue.empty()) return false;
    student temp = pqueue.top();
    pqueue.pop();
    ans.push_back(temp);
    if (temp.c > mm) return false;
    mm -= temp.c;
  }
  for (int ith = nb, index = 0; ith >= 1; ith -= day, index++) {
    int id = ans[index].id;
    int ed = ith, st = max(1, ed - day + 1);
    for (int k = st; k <= ed; k++) bug[k].s = id;
  }
  return true;
}
int solve() {
  int low = 1, high = nb, LEN = -1;
  while (low <= high) {
    int mid = (low + high) >> 1;
    if (work(mid)) {
      LEN = mid;
      high = mid - 1;
    } else
      low = mid + 1;
  }
  return LEN;
}
int main() {
  while (cin >> ns >> nb >> money) {
    for (int i = 1; i <= nb; i++) {
      cin >> bug[i].a;
      bug[i].id = i;
      bug[i].s = -1;
    }
    for (int i = 1; i <= ns; i++) stu[i].id = i;
    for (int i = 1; i <= ns; i++) cin >> stu[i].b;
    for (int i = 1; i <= ns; i++) cin >> stu[i].c;
    sort(bug + 1, bug + nb + 1, cmp_bug_a);
    sort(stu + 1, stu + ns + 1, cmp_stu_b);
    int ans = solve();
    if (ans == -1) {
      puts("NO");
      continue;
    }
    puts("YES");
    sort(bug + 1, bug + nb + 1, cmp_bug_id);
    for (int i = 1; i <= nb; i++) printf("%d ", bug[i].s);
    puts("");
  }
  return 0;
}
