#include <bits/stdc++.h>
using namespace std;
struct aa {
  int sk, f, id;
  bool operator<(const aa &s) const { return sk < s.sk; }
} stu[100010], bug[100010];
struct cmp {
  bool operator()(aa &x, aa &y) { return x.f > y.f; }
};
int n, m, s, ans[100010];
bool check(int t) {
  int cur = 0;
  priority_queue<aa, vector<aa>, cmp> que;
  for (int i = m - 1, j = n - 1; i >= 0; i -= t) {
    for (; j >= 0 && stu[j].sk >= bug[i].sk; j--) que.push(stu[j]);
    if (que.empty()) return false;
    cur += que.top().f;
    if (cur > s) return false;
    for (int k = i; k >= max(0, i - t + 1); k--) ans[bug[k].id] = que.top().id;
    que.pop();
  }
  return true;
}
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 0; i < m; i++) scanf("%d", &bug[i].sk), bug[i].id = i;
  for (int i = 0; i < n; i++) scanf("%d", &stu[i].sk);
  for (int i = 0; i < n; i++) scanf("%d", &stu[i].f), stu[i].id = i;
  sort(stu, stu + n);
  sort(bug, bug + m);
  if (!check(m)) {
    printf("NO\n");
    return 0;
  }
  int lb = 0, ub = m + 1;
  while (ub - lb > 1) {
    int mid = (ub + lb) / 2;
    if (check(mid))
      ub = mid;
    else
      lb = mid;
  }
  printf("YES\n");
  check(ub);
  for (int i = 0; i < m; i++) printf("%d ", ans[i] + 1);
  putchar('\n');
  return 0;
}
