#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, m, s, l, r, mid, ans;
long long now[N], hh[N];
struct number {
  long long x, v, id;
} num[N];
struct number2 {
  long long x, id;
} bug[N];
inline bool cmp2(number2 a, number2 b) { return a.x > b.x; }
inline bool cmp(number a, number b) { return a.x > b.x; }
struct node {
  long long v, id;
  inline bool operator<(const node &x) const { return x.v < v; }
};
priority_queue<node> q;
inline bool jay(long long mid) {
  memset(now, 0, sizeof(now));
  while (q.size()) q.pop();
  long long i = 1, j = 1, ans = 0;
  while (i <= m) {
    while (j <= n && num[j].x >= bug[i].x)
      q.push((node){num[j].v, num[j].id}), j++;
    if (!q.size()) return false;
    node u = q.top();
    q.pop();
    ans += u.v;
    if (ans > s) return false;
    long long nxt = min(m, i + mid - 1);
    for (register long long k = i; k <= nxt; ++k) now[bug[k].id] = u.id;
    i = nxt + 1;
  }
  return true;
}
signed main() {
  scanf("%lld%lld%lld", &n, &m, &s);
  for (register long long i = 1; i <= m; ++i)
    scanf("%lld", &bug[i].x), bug[i].id = i;
  sort(bug + 1, bug + m + 1, cmp2);
  for (register long long i = 1; i <= n; ++i)
    scanf("%lld", &num[i].x), num[i].id = i;
  for (register long long i = 1; i <= n; ++i) scanf("%lld", &num[i].v);
  sort(num + 1, num + n + 1, cmp);
  l = 0;
  r = m;
  while (l <= r) {
    mid = l + r >> 1;
    if (jay(mid)) {
      ans = mid, r = mid - 1;
      for (register long long i = 1; i <= m; ++i) hh[i] = now[i];
    } else
      l = mid + 1;
  }
  if (ans) {
    puts("YES");
    for (register long long i = 1; i <= m; ++i) printf("%lld ", hh[i]);
  } else
    puts("NO");
  return 0;
}
