#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5;
inline long long read() {
  long long s = 0;
  register bool neg = 0;
  register char c = getchar();
  for (; c < '0' || c > '9'; c = getchar()) neg |= (c == '-');
  for (; c >= '0' && c <= '9'; s = s * 10 + (c ^ 48), c = getchar())
    ;
  s = (neg ? -s : s);
  return s;
}
long long a, b, c, Ans[N + 10];
struct node {
  long long val, w, id;
  bool operator<(const node &o) const {
    return val > o.val || val == o.val && w < o.w;
  }
} p[N + 10];
struct Node {
  long long val, id;
  bool operator<(const Node &o) const { return val > o.val; }
} s[N + 10];
inline bool check(long long n) {
  long long tmp = 0, q[N + 10];
  priority_queue<pair<long long, long long>,
                 vector<pair<long long, long long> >,
                 greater<pair<long long, long long> > >
      qu;
  for (long long i = 1, j = 0; i <= b; i += n) {
    while (p[j + 1].val >= s[i].val) {
      qu.push(make_pair(p[j + 1].w, p[j + 1].id));
      ++j;
    }
    if (!qu.size()) return false;
    pair<long long, long long> tp = qu.top();
    tmp += tp.first;
    qu.pop();
    for (long long k = i; k <= min(b, i + n - 1); k++) q[s[k].id] = tp.second;
    if (tmp > c) return false;
  }
  memcpy(Ans, q, sizeof(q));
  return true;
}
signed main() {
  a = read();
  b = read();
  c = read();
  for (long long i = 1; i <= b; i++) {
    s[i].val = read();
    s[i].id = i;
  }
  sort(s + 1, s + b + 1);
  for (long long i = 1; i <= a; i++) p[i].val = read(), p[i].id = i;
  for (long long i = 1; i <= a; i++) p[i].w = read();
  sort(p + 1, p + a + 1);
  long long l = 1, r = b, ans = -1;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (check(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  puts(ans == -1 ? "NO" : "YES");
  if (ans != -1)
    for (long long i = 1; i <= b; i++) printf("%lld ", Ans[i]);
  return 0;
}
