#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], b[N], c[N], ans[N], id[N], idt[N];
int n, m, s;
bool cmp(int x, int y) { return a[x] > a[y]; }
bool cmp1(int x, int y) { return b[x] > b[y]; }
bool isok(int x) {
  int l = 1, L = 1;
  long long sum = 0;
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      q;
  while (l <= m) {
    while (L <= n && b[idt[L]] >= a[id[l]]) {
      q.push(make_pair(c[idt[L]], idt[L]));
      L++;
    }
    if (q.empty()) return false;
    int t = q.top().second;
    sum += c[t];
    q.pop();
    for (int i = 0; i < x && l <= m; i++) ans[id[l++]] = t;
  }
  return sum <= (long long)s;
}
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &c[i]);
  for (int i = 1; i <= m; i++) id[i] = i;
  sort(id + 1, id + 1 + m, cmp);
  for (int i = 1; i <= n; i++) idt[i] = i;
  sort(idt + 1, idt + 1 + n, cmp1);
  int l = 0, r = N;
  while (l < r) {
    int mid = (l + r) / 2;
    if (!isok(mid))
      l = mid + 1;
    else
      r = mid;
  }
  if (l == N)
    printf("NO\n");
  else {
    isok(l);
    printf("YES\n");
    for (int i = 1; i <= m; i++) printf("%d ", ans[i]);
  }
  return 0;
}
