#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int n, m;
long long s, a[maxn], b[maxn], c[maxn];
struct node {
  long long val;
  int id;
} d[maxn], e[maxn];
int pre[maxn], suc[maxn], st[maxn], h[maxn], cnt = 0, an[maxn];
priority_queue<pair<int, int> > q;
deque<int> dq;
int cmp(node a, node b) { return a.val > b.val; }
int check(int mid) {
  long long sum = s;
  int j = 1;
  dq.clear();
  while (!q.empty()) q.pop();
  for (int i = 1; i <= m; i++) {
    while (j <= n && e[j].val >= d[i].val)
      q.push(make_pair(-c[e[j].id], e[j].id)), ++j;
    if (q.empty() && dq.empty()) return 0;
    if (dq.empty()) {
      int x = q.top().second;
      sum += q.top().first;
      q.pop();
      for (int k = 0; k < mid; k++) dq.push_back(x);
      if (sum < 0) return 0;
    }
    an[d[i].id] = dq.front();
    dq.pop_front();
  }
  return 1;
}
int main() {
  scanf("%d%d%I64d", &n, &m, &s);
  for (int i = 1; i <= m; i++) scanf("%I64d", &a[i]), d[i] = (node){a[i], i};
  sort(d + 1, d + m + 1, cmp);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &b[i]);
    e[i] = (node){b[i], i};
  }
  sort(e + 1, e + n + 1, cmp);
  for (int i = 1; i <= n; i++) scanf("%I64d", &c[i]);
  int l = 1, r = m, mid = (l + r) >> 1;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (check(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  if (l > m)
    printf("NO\n");
  else {
    printf("YES\n");
    check(l);
    for (int i = 1; i <= m; i++) {
      printf("%d", an[i]);
      if (i < m) putchar(' ');
    }
  }
  return 0;
}
