#include <bits/stdc++.h>
using namespace std;
int b[100005], c[100005], n, m, limit;
struct node {
  int key, id, ans;
  node() {}
  node(int key, int id) : key(key), id(id) {}
  friend bool operator<(const node &a, const node &b) { return a.key < b.key; }
} bug[100005];
struct nod1 {
  int key, cost, id;
  nod1() {}
  nod1(int key, int cost, int id) : key(key), cost(cost), id(id) {}
  friend bool operator<(const nod1 &a, const nod1 &b) {
    return a.cost > b.cost;
  }
} st[100005];
priority_queue<nod1> Q;
bool cmp(node x, node y) { return x.id < y.id; }
bool cmp1(nod1 x, nod1 y) { return x.key < y.key; }
void init() {
  scanf("%d%d%d", &n, &m, &limit);
  for (int i = 1; i <= m; i++) {
    int p;
    scanf("%d", &p);
    bug[i] = node(p, i);
  }
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &c[i]);
  for (int i = 1; i <= n; i++) st[i] = nod1(b[i], c[i], i);
  sort(bug + 1, bug + 1 + m);
  sort(st + 1, st + 1 + n, cmp1);
}
bool check(int x) {
  int now = m, now1 = n;
  long long sum = 0;
  while (!Q.empty()) Q.pop();
  while (now > 0) {
    while (now1 > 0 && st[now1].key >= bug[now].key) Q.push(st[now1]), now1--;
    if (Q.empty()) return false;
    nod1 t = Q.top();
    Q.pop();
    sum += (long long)t.cost;
    for (int i = 1; i <= x; i++)
      if (now > 0) bug[now].ans = t.id, now--;
    if (sum > limit) return false;
  }
  return true;
}
int find(int x, int y) {
  int mid, l = x, r = y, tmp1;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (check(mid) == true) {
      r = mid - 1;
      tmp1 = mid;
    } else
      l = mid + 1;
  }
  return tmp1;
}
void work() {
  if (check(m) == false)
    printf("NO\n");
  else {
    printf("YES\n");
    int tmp = find(1, m);
    check(tmp);
    sort(bug + 1, bug + 1 + m, cmp);
    for (int i = 1; i <= m; i++) printf("%d ", bug[i].ans);
    printf("\n");
  }
}
int main() {
  init();
  work();
}
