#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
pair<int, int> a[N], b[N], h[N];
int n, m, s, c[N], f[N];
char go(int t) {
  int p = 0;
  for (int i = m, j = n, r = s; i > 0;) {
    while (j > 0 && b[j - 1].first >= a[i - 1].first)
      --j, h[p++] = pair<int, int>(-c[b[j].second], b[j].second),
           push_heap(h, h + p);
    if (p < 1) return 0;
    if ((r += h[0].first) < 0)
      return 0;
    else
      for (int u = t; u-- > 0 && i-- > 0;) f[a[i].second] = h[0].second;
    pop_heap(h, h + p--);
  }
  return 1;
}
int main() {
  cin >> n >> m >> s;
  for (int i = 0; i < m; ++i) cin >> a[i].first, a[i].second = i;
  for (int i = 0; i < n; ++i) cin >> b[i].first, b[i].second = i;
  for (int i = 0; i < n; ++i) cin >> c[i];
  sort(a, a + m), sort(b, b + n);
  int lo = 0, hi = m + 1;
  while (lo < hi) {
    int md = (lo + hi) / 2;
    if (go(md))
      hi = md;
    else
      lo = md + 1;
  }
  if (lo > m)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    go(lo);
    for (int i = 0; i < m; ++i) cout << (f[i] + 1) << " ";
    cout << endl;
  }
}
