#include <bits/stdc++.h>
using namespace std;
const int maxn = 100020;
long long a, b, c;
long long ans[maxn];
pair<long long, long long> bug[maxn];
pair<long long, pair<long long, long long> > ar[maxn];
set<pair<long long, long long> > st;
bool f(int K) {
  long long sum = 0;
  long long t = 1;
  st.clear();
  for (int i = 1; i <= b; i += K) {
    while (t <= a && ar[t].first >= bug[i].first) {
      st.insert(ar[t].second);
      t++;
    }
    if (st.empty()) return false;
    pair<long long, long long> k = *st.begin();
    st.erase(st.begin());
    sum += k.first;
    for (int j = i; j <= b && j < i + K; j++) ans[bug[j].second] = k.second;
  }
  return sum <= c;
}
int main() {
  scanf("%d %d %d", &a, &b, &c);
  for (int i = 1; i <= b; i++) scanf("%d", &bug[i].first), bug[i].second = i;
  sort(bug + 1, bug + 1 + b);
  reverse(bug + 1, bug + 1 + b);
  for (int i = 1; i <= a; i++) scanf("%d", &ar[i].first);
  for (int i = 1; i <= a; i++)
    scanf("%I64d", &ar[i].second.first), ar[i].second.second = i;
  sort(ar + 1, ar + 1 + a);
  reverse(ar + 1, ar + 1 + a);
  long long l = 1;
  long long r = b + 2;
  while (l < r) {
    int m = (l + r) / 2;
    if (f(m))
      r = m;
    else
      l = m + 1;
  }
  if (l > b + 1) {
    printf("NO\n");
    return 0;
  } else {
    f(l);
    printf("YES\n");
    for (int i = 1; i <= b; i++) printf("%I64d ", ans[i]);
    printf("\n");
  }
  return 0;
}
