#include <bits/stdc++.h>
using namespace std;
const long long maxn = 100010;
long long n, m, s, a[maxn], b[maxn], c[maxn], bel[maxn];
long long ar[maxn], ak[maxn], br[maxn], bk[maxn];
long long rm[maxn];
inline bool cmp_a(long long i, long long j) { return a[i] < a[j]; }
inline bool cmp_b(long long i, long long j) { return b[i] < b[j]; }
priority_queue<pair<long long, long long> > h;
bool chk(long long x) {
  long long i, j, k, t, tot(0);
  while (h.size()) h.pop();
  j = n;
  for (i = m; i;) {
    for (; j && bk[j] >= ak[i]; j--)
      h.push(pair<long long, long long>(-c[br[j]], br[j]));
    if (h.empty()) break;
    k = h.top().second;
    h.pop();
    tot += c[k];
    for (t = i; i && i >= t - x + 1; i--) bel[ar[i]] = k;
  }
  if (i) return false;
  return tot <= s;
}
int main() {
  long long i, j, k, l, t, ii, jj, kk, tt;
  scanf("%I64d%I64d%I64d", &n, &m, &s);
  for (i = 1; i <= m; i++) scanf("%I64d", a + i);
  for (i = 1; i <= n; i++) scanf("%I64d", b + i);
  for (i = 1; i <= n; i++) scanf("%I64d", c + i);
  for (i = 1; i <= m; i++) ar[i] = i;
  sort(ar + 1, ar + m + 1, cmp_a);
  for (i = 1; i <= m; i++) ak[i] = a[ar[i]];
  for (i = 1; i <= n; i++) br[i] = i;
  sort(br + 1, br + n + 1, cmp_b);
  for (i = 1; i <= n; i++) bk[i] = b[br[i]];
  l = 1;
  long long r = m + 1, mid;
  while (l < r) {
    mid = (l + r) >> 1;
    if (chk(mid))
      r = mid;
    else
      l = mid + 1;
  }
  chk(l);
  if (l == m + 1)
    puts("NO");
  else {
    puts("YES");
    for (i = 1; i <= m; i++) printf("%I64d%c", bel[i], i < m ? ' ' : '\n');
  }
  return 0;
}
