#include <bits/stdc++.h>
struct data {
  long long b, c, d;
  bool operator<(const data &l) const { return c < l.c; }
  bool operator>(const data &l) const { return c > l.c; }
};
long long n, m, s;
long long tr[100005];
data p[100005], a[100005];
std::priority_queue<data, std::vector<data>, std::greater<data> > heap;
bool comp(const data &l, const data &r) { return l.b < r.b; }
void input() {
  scanf("%lld%lld%lld", &n, &m, &s);
  for (long long i = 1; i <= m; i++) a[i].b = i;
  for (long long i = 1; i <= m; i++) scanf("%lld", &a[i].c);
  for (long long i = 1; i <= n; i++) scanf("%lld", &p[i].b);
  for (long long i = 1; i <= n; i++) scanf("%lld", &p[i].c);
  for (long long i = 1; i <= n; i++) p[i].d = i;
  std::sort(p + 1, p + n + 1, comp);
  std::sort(a + 1, a + m + 1);
}
bool check(long long d, long long ord) {
  long long i, j = n, sum = 0;
  for (i = m; i >= 1; i -= d) {
    for (; j >= 1; j--) {
      if (a[i].c <= p[j].b)
        heap.push(p[j]);
      else
        break;
    }
    if (heap.empty()) return false;
    sum += heap.top().c;
    if (ord == 1) {
      for (long long k = i; k > i - d && k >= 1; k--) {
        tr[a[k].b] = heap.top().d;
      }
    }
    heap.pop();
  }
  while (!heap.empty()) heap.pop();
  if (sum <= s) return true;
  return false;
}
void solve() {
  long long st = 1, en = m, mi = (st + en) / 2, ans = 0;
  while (st <= en) {
    if (check(mi, 0)) {
      ans = mi;
      en = mi - 1;
    } else
      st = mi + 1;
    mi = (st + en) / 2;
  }
  if (ans == 0)
    printf("NO\n");
  else {
    printf("YES\n");
    check(ans, 1);
    for (long long i = 1; i <= m; i++) printf("%lld ", tr[i]);
  }
}
int main() {
  input();
  solve();
  return 0;
}
